Коммит
395b22aafa
|
@ -1,179 +0,0 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
from msrest.service_client import ServiceClient
|
||||
from msrest import Configuration, Serializer, Deserializer
|
||||
from .version import VERSION
|
||||
from msrest.pipeline import ClientRawResponse
|
||||
from msrest.exceptions import HttpOperationError
|
||||
from . import models
|
||||
|
||||
|
||||
class AzureTfsConfiguration(Configuration):
|
||||
"""Configuration for AzureTfs
|
||||
Note that all parameters used to create this instance are saved as instance
|
||||
attributes.
|
||||
|
||||
:param api_version: Version of the API to use. This should be set to
|
||||
'3.2-preview' to use this version of the api.
|
||||
:type api_version: str
|
||||
:param str base_url: Service URL
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self, api_version, base_url=None):
|
||||
|
||||
if api_version is None:
|
||||
raise ValueError("Parameter 'api_version' must not be None.")
|
||||
if not isinstance(api_version, str):
|
||||
raise TypeError("Parameter 'api_version' must be str.")
|
||||
if not base_url:
|
||||
base_url = 'https://stamp2.app.portalext.visualstudio.com/'
|
||||
|
||||
super(AzureTfsConfiguration, self).__init__(base_url)
|
||||
|
||||
self.add_user_agent('azuretfs/{}'.format(VERSION))
|
||||
|
||||
self.api_version = api_version
|
||||
|
||||
|
||||
class AzureTfs(object):
|
||||
"""AzureTfs
|
||||
|
||||
:ivar config: Configuration for client.
|
||||
:vartype config: AzureTfsConfiguration
|
||||
|
||||
:param api_version: Version of the API to use. This should be set to
|
||||
'3.2-preview' to use this version of the api.
|
||||
:type api_version: str
|
||||
:param str base_url: Service URL
|
||||
:param Credentials creds: credentials for vsts
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self, api_version, base_url=None, creds=None):
|
||||
self.config = AzureTfsConfiguration(api_version, base_url)
|
||||
self._client = ServiceClient(creds, self.config)
|
||||
|
||||
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
|
||||
self.api_version = '3.2' if not api_version else api_version
|
||||
self._serialize = Serializer(client_models)
|
||||
self._deserialize = Deserializer(client_models)
|
||||
|
||||
def configure_continuous_deployment(
|
||||
self, body, custom_headers=None, raw=False, **operation_config):
|
||||
"""ConfigureContinuousDeployment.
|
||||
|
||||
:param body:
|
||||
:type body: :class:`ContinuousDeploymentConfiguration
|
||||
<azuretfs.models.ContinuousDeploymentConfiguration>`
|
||||
:param dict custom_headers: headers that will be added to the request
|
||||
:param bool raw: returns the direct response alongside the
|
||||
deserialized response
|
||||
:param operation_config: :ref:`Operation configuration
|
||||
overrides<msrest:optionsforoperations>`.
|
||||
:rtype: :class:`ContinuousDeploymentOperation
|
||||
<azuretfs.models.ContinuousDeploymentOperation>`
|
||||
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
|
||||
if raw=true
|
||||
:raises:
|
||||
:class:`HttpOperationError<msrest.exceptions.HttpOperationError>`
|
||||
"""
|
||||
# Construct URL
|
||||
url = '/_apis/azuretfs/continuousdeploymentconfiguration'
|
||||
|
||||
# Construct parameters
|
||||
query_parameters = {}
|
||||
if self.api_version:
|
||||
query_parameters["api-version"] = self.api_version
|
||||
|
||||
# Construct headers
|
||||
header_parameters = {}
|
||||
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
|
||||
if custom_headers:
|
||||
header_parameters.update(custom_headers)
|
||||
|
||||
# Construct body
|
||||
body_content = self._serialize.body(body, 'ContinuousDeploymentConfiguration')
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.post(url, query_parameters)
|
||||
response = self._client.send(
|
||||
request, header_parameters, body_content, **operation_config)
|
||||
if response.status_code not in [200, 202]:
|
||||
print("response:", response.status_code)
|
||||
print(response.text)
|
||||
raise HttpOperationError(self._deserialize, response)
|
||||
|
||||
deserialized = None
|
||||
|
||||
if response.status_code == 200:
|
||||
deserialized = self._deserialize('ContinuousDeploymentOperation', response)
|
||||
if response.status_code == 202:
|
||||
deserialized = self._deserialize('ContinuousDeploymentOperation', response)
|
||||
|
||||
if raw:
|
||||
client_raw_response = ClientRawResponse(deserialized, response)
|
||||
return client_raw_response
|
||||
|
||||
return deserialized
|
||||
|
||||
def get_continuous_deployment_operation(
|
||||
self, continuous_deployment_operation_id, custom_headers=None, raw=False, **operation_config):
|
||||
"""GetContinuousDeploymentOperation.
|
||||
|
||||
:param continuous_deployment_operation_id:
|
||||
:type continuous_deployment_operation_id: str
|
||||
:param dict custom_headers: headers that will be added to the request
|
||||
:param bool raw: returns the direct response alongside the
|
||||
deserialized response
|
||||
:param operation_config: :ref:`Operation configuration
|
||||
overrides<msrest:optionsforoperations>`.
|
||||
:rtype: :class:`ContinuousDeploymentOperation
|
||||
<azuretfs.models.ContinuousDeploymentOperation>`
|
||||
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
|
||||
if raw=true
|
||||
:raises:
|
||||
:class:`HttpOperationError<msrest.exceptions.HttpOperationError>`
|
||||
"""
|
||||
# Construct URL
|
||||
url = '/_apis/azuretfs/continuousdeploymentconfiguration/{continuousDeploymentOperationId}'
|
||||
path_format_arguments = {
|
||||
'continuousDeploymentOperationId': self._serialize.url("continuous_deployment_operation_id", continuous_deployment_operation_id, 'str')
|
||||
}
|
||||
url = self._client.format_url(url, **path_format_arguments)
|
||||
|
||||
# Construct parameters
|
||||
query_parameters = {}
|
||||
|
||||
# Construct headers
|
||||
header_parameters = {}
|
||||
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
|
||||
if custom_headers:
|
||||
header_parameters.update(custom_headers)
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters)
|
||||
response = self._client.send(request, header_parameters, **operation_config)
|
||||
if response.status_code not in [200]:
|
||||
print("response:", response.status_code)
|
||||
print(response.text)
|
||||
raise HttpOperationError(self._deserialize, response)
|
||||
|
||||
deserialized = None
|
||||
|
||||
if response.status_code == 200:
|
||||
deserialized = self._deserialize('ContinuousDeploymentOperation', response)
|
||||
|
||||
if raw:
|
||||
client_raw_response = ClientRawResponse(deserialized, response)
|
||||
return client_raw_response
|
||||
|
||||
return deserialized
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from .property import Property
|
||||
from .resource_configuration import ResourceConfiguration
|
||||
from .pipeline_configuration import PipelineConfiguration
|
||||
from .source_repository import SourceRepository
|
||||
from .source_configuration import SourceConfiguration
|
||||
from .continuous_deployment_configuration import ContinuousDeploymentConfiguration
|
||||
from .continuous_deployment_operation import ContinuousDeploymentOperation
|
||||
from .reference_links import ReferenceLinks
|
||||
from .operation import Operation
|
||||
from .operation_reference import OperationReference
|
||||
from .collection_info import CollectionInfo
|
||||
from .repository_info import RepositoryInfo
|
||||
from .team_project_info import TeamProjectInfo
|
||||
from .vsts_info import VstsInfo
|
||||
|
||||
__all__ = [
|
||||
'Property',
|
||||
'ResourceConfiguration',
|
||||
'PipelineConfiguration',
|
||||
'SourceRepository',
|
||||
'SourceConfiguration',
|
||||
'ContinuousDeploymentConfiguration',
|
||||
'ContinuousDeploymentOperation',
|
||||
'ReferenceLinks',
|
||||
'Operation',
|
||||
'OperationReference',
|
||||
'CollectionInfo',
|
||||
'RepositoryInfo',
|
||||
'TeamProjectInfo',
|
||||
'VstsInfo',
|
||||
]
|
|
@ -1,49 +0,0 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from msrest.serialization import Model
|
||||
|
||||
|
||||
class ContinuousDeploymentConfiguration(Model):
|
||||
"""ContinuousDeploymentConfiguration.
|
||||
|
||||
:param account_configuration:
|
||||
:type account_configuration: :class:`ResourceConfiguration
|
||||
<azuretfs.models.ResourceConfiguration>`
|
||||
:param pipeline_configuration:
|
||||
:type pipeline_configuration: :class:`PipelineConfiguration
|
||||
<azuretfs.models.PipelineConfiguration>`
|
||||
:param project_configuration:
|
||||
:type project_configuration: :class:`ResourceConfiguration
|
||||
<azuretfs.models.ResourceConfiguration>`
|
||||
:param source_configuration:
|
||||
:type source_configuration: :class:`SourceConfiguration
|
||||
<azuretfs.models.SourceConfiguration>`
|
||||
:param target_configuration:
|
||||
:type target_configuration: list of :class:`Property
|
||||
<azuretfs.models.Property>`
|
||||
:param test_configuration:
|
||||
:type test_configuration: list of :class:`Property
|
||||
<azuretfs.models.Property>`
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'account_configuration': {'key': 'accountConfiguration', 'type': 'ResourceConfiguration'},
|
||||
'pipeline_configuration': {'key': 'pipelineConfiguration', 'type': 'PipelineConfiguration'},
|
||||
'project_configuration': {'key': 'projectConfiguration', 'type': 'ResourceConfiguration'},
|
||||
'source_configuration': {'key': 'sourceConfiguration', 'type': 'SourceConfiguration'},
|
||||
'target_configuration': {'key': 'targetConfiguration', 'type': '[Property]'},
|
||||
'test_configuration': {'key': 'testConfiguration', 'type': '[Property]'},
|
||||
}
|
||||
|
||||
def __init__(self, account_configuration=None, pipeline_configuration=None, project_configuration=None, source_configuration=None, target_configuration=None, test_configuration=None):
|
||||
self.account_configuration = account_configuration
|
||||
self.pipeline_configuration = pipeline_configuration
|
||||
self.project_configuration = project_configuration
|
||||
self.source_configuration = source_configuration
|
||||
self.target_configuration = target_configuration
|
||||
self.test_configuration = test_configuration
|
|
@ -1,40 +0,0 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from .operation import Operation
|
||||
|
||||
|
||||
class ContinuousDeploymentOperation(Operation):
|
||||
"""ContinuousDeploymentOperation.
|
||||
|
||||
:param id: The identifier for this operation.
|
||||
:type id: str
|
||||
:param status: The current status of the operation.
|
||||
:type status: object
|
||||
:param url: Url to get the full object.
|
||||
:type url: str
|
||||
:param _links: The links to other objects related to this object.
|
||||
:type _links: :class:`ReferenceLinks <azuretfs.models.ReferenceLinks>`
|
||||
:param result_message: The result message which is generally not set.
|
||||
:type result_message: str
|
||||
:param deployment_step_ids:
|
||||
:type deployment_step_ids: list of :class:`Property
|
||||
<azuretfs.models.Property>`
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'id': {'key': 'id', 'type': 'str'},
|
||||
'status': {'key': 'status', 'type': 'object'},
|
||||
'url': {'key': 'url', 'type': 'str'},
|
||||
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
|
||||
'result_message': {'key': 'resultMessage', 'type': 'str'},
|
||||
'deployment_step_ids': {'key': 'deploymentStepIds', 'type': '[Property]'},
|
||||
}
|
||||
|
||||
def __init__(self, id=None, status=None, url=None, _links=None, result_message=None, deployment_step_ids=None):
|
||||
super(ContinuousDeploymentOperation, self).__init__(id=id, status=status, url=url, _links=_links, result_message=result_message)
|
||||
self.deployment_step_ids = deployment_step_ids
|
|
@ -1,37 +0,0 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from .operation_reference import OperationReference
|
||||
|
||||
|
||||
class Operation(OperationReference):
|
||||
"""Operation.
|
||||
|
||||
:param id: The identifier for this operation.
|
||||
:type id: str
|
||||
:param status: The current status of the operation.
|
||||
:type status: object
|
||||
:param url: Url to get the full object.
|
||||
:type url: str
|
||||
:param _links: The links to other objects related to this object.
|
||||
:type _links: :class:`ReferenceLinks <azuretfs.models.ReferenceLinks>`
|
||||
:param result_message: The result message which is generally not set.
|
||||
:type result_message: str
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'id': {'key': 'id', 'type': 'str'},
|
||||
'status': {'key': 'status', 'type': 'object'},
|
||||
'url': {'key': 'url', 'type': 'str'},
|
||||
'_links': {'key': '_links', 'type': 'ReferenceLinks'},
|
||||
'result_message': {'key': 'resultMessage', 'type': 'str'},
|
||||
}
|
||||
|
||||
def __init__(self, id=None, status=None, url=None, _links=None, result_message=None):
|
||||
super(Operation, self).__init__(id=id, status=status, url=url)
|
||||
self._links = _links
|
||||
self.result_message = result_message
|
|
@ -1,31 +0,0 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from msrest.serialization import Model
|
||||
|
||||
|
||||
class OperationReference(Model):
|
||||
"""OperationReference.
|
||||
|
||||
:param id: The identifier for this operation.
|
||||
:type id: str
|
||||
:param status: The current status of the operation.
|
||||
:type status: object
|
||||
:param url: Url to get the full object.
|
||||
:type url: str
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'id': {'key': 'id', 'type': 'str'},
|
||||
'status': {'key': 'status', 'type': 'object'},
|
||||
'url': {'key': 'url', 'type': 'str'},
|
||||
}
|
||||
|
||||
def __init__(self, id=None, status=None, url=None):
|
||||
self.id = id
|
||||
self.status = status
|
||||
self.url = url
|
|
@ -1,31 +0,0 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from msrest.serialization import Model
|
||||
|
||||
|
||||
class PipelineConfiguration(Model):
|
||||
"""PipelineConfiguration.
|
||||
|
||||
:param client_type:
|
||||
:type client_type: object
|
||||
:param prod_environment_name:
|
||||
:type prod_environment_name: str
|
||||
:param test_environment_name:
|
||||
:type test_environment_name: str
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'client_type': {'key': 'clientType', 'type': 'object'},
|
||||
'prod_environment_name': {'key': 'prodEnvironmentName', 'type': 'str'},
|
||||
'test_environment_name': {'key': 'testEnvironmentName', 'type': 'str'},
|
||||
}
|
||||
|
||||
def __init__(self, client_type=None, prod_environment_name=None, test_environment_name=None):
|
||||
self.client_type = client_type
|
||||
self.prod_environment_name = prod_environment_name
|
||||
self.test_environment_name = test_environment_name
|
|
@ -1,27 +0,0 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from msrest.serialization import Model
|
||||
|
||||
|
||||
class Property(Model):
|
||||
"""Property.
|
||||
|
||||
:param name:
|
||||
:type name: str
|
||||
:param value:
|
||||
:type value: str
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'name': {'key': 'name', 'type': 'str'},
|
||||
'value': {'key': 'value', 'type': 'str'},
|
||||
}
|
||||
|
||||
def __init__(self, name=None, value=None):
|
||||
self.name = name
|
||||
self.value = value
|
|
@ -1,24 +0,0 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from msrest.serialization import Model
|
||||
|
||||
|
||||
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):
|
||||
self.links = links
|
|
@ -1,31 +0,0 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from msrest.serialization import Model
|
||||
|
||||
|
||||
class ResourceConfiguration(Model):
|
||||
"""ResourceConfiguration.
|
||||
|
||||
:param create_if_not_found:
|
||||
:type create_if_not_found: bool
|
||||
:param properties:
|
||||
:type properties: list of :class:`Property <azuretfs.models.Property>`
|
||||
:param resource_name:
|
||||
:type resource_name: str
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'create_if_not_found': {'key': 'createIfNotFound', 'type': 'bool'},
|
||||
'properties': {'key': 'properties', 'type': '[Property]'},
|
||||
'resource_name': {'key': 'resourceName', 'type': 'str'},
|
||||
}
|
||||
|
||||
def __init__(self, create_if_not_found=None, properties=None, resource_name=None):
|
||||
self.create_if_not_found = create_if_not_found
|
||||
self.properties = properties
|
||||
self.resource_name = resource_name
|
|
@ -1,28 +0,0 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from msrest.serialization import Model
|
||||
|
||||
|
||||
class SourceConfiguration(Model):
|
||||
"""SourceConfiguration.
|
||||
|
||||
:param source_repository:
|
||||
:type source_repository: :class:`SourceRepository
|
||||
<azuretfs.models.SourceRepository>`
|
||||
:param source_version:
|
||||
:type source_version: str
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'source_repository': {'key': 'sourceRepository', 'type': 'SourceRepository'},
|
||||
'source_version': {'key': 'sourceVersion', 'type': 'str'},
|
||||
}
|
||||
|
||||
def __init__(self, source_repository=None, source_version=None):
|
||||
self.source_repository = source_repository
|
||||
self.source_version = source_version
|
|
@ -1,33 +0,0 @@
|
|||
# coding=utf-8
|
||||
# --------------------------------------------------------------------------
|
||||
# Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
# Changes may cause incorrect behavior and will be lost if the code is
|
||||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from msrest.serialization import Model
|
||||
|
||||
|
||||
class SourceRepository(Model):
|
||||
"""SourceRepository.
|
||||
|
||||
:param identifier:
|
||||
:type identifier: str
|
||||
:param properties: The properties cannot be IEnumerable/IList, since XML
|
||||
serializer does not work well with interfaces. This object gets passed as
|
||||
job parameter which uses XML serializer.
|
||||
:type properties: list of :class:`Property <azuretfs.models.Property>`
|
||||
:param repository_type:
|
||||
:type repository_type: object
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'identifier': {'key': 'identifier', 'type': 'str'},
|
||||
'properties': {'key': 'properties', 'type': '[Property]'},
|
||||
'repository_type': {'key': 'repositoryType', 'type': 'object'},
|
||||
}
|
||||
|
||||
def __init__(self, identifier=None, properties=None, repository_type=None):
|
||||
self.identifier = identifier
|
||||
self.properties = properties
|
||||
self.repository_type = repository_type
|
|
@ -38,7 +38,7 @@ class ContinuousDeliveryConfiguration(Configuration):
|
|||
|
||||
super(ContinuousDeliveryConfiguration, self).__init__(base_url)
|
||||
|
||||
self.add_user_agent('azurecli/{}/continuousdelivery/{}'.format(VERSION, VERSION))
|
||||
self.add_user_agent('azurecli/{} continuousdelivery/{}'.format(VERSION, VERSION))
|
||||
|
||||
self.api_version = api_version
|
||||
|
||||
|
@ -72,14 +72,14 @@ class ContinuousDelivery(object):
|
|||
|
||||
:param body:
|
||||
:type body: :class:`ContinuousDeploymentConfiguration
|
||||
<azuretfs.models.ContinuousDeploymentConfiguration>`
|
||||
<vsts_info_provider.models.ContinuousDeploymentConfiguration>`
|
||||
:param dict custom_headers: headers that will be added to the request
|
||||
:param bool raw: returns the direct response alongside the
|
||||
deserialized response
|
||||
:param operation_config: :ref:`Operation configuration
|
||||
overrides<msrest:optionsforoperations>`.
|
||||
:rtype: :class:`ContinuousDeploymentOperation
|
||||
<azuretfs.models.ContinuousDeploymentOperation>`
|
||||
<vsts_info_provider.models.ContinuousDeploymentOperation>`
|
||||
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
|
||||
if raw=true
|
||||
:raises:
|
||||
|
@ -137,7 +137,7 @@ class ContinuousDelivery(object):
|
|||
:param operation_config: :ref:`Operation configuration
|
||||
overrides<msrest:optionsforoperations>`.
|
||||
:rtype: :class:`ContinuousDeploymentOperation
|
||||
<azuretfs.models.ContinuousDeploymentOperation>`
|
||||
<vsts_info_provider.models.ContinuousDeploymentOperation>`
|
||||
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
|
||||
if raw=true
|
||||
:raises:
|
||||
|
|
2
setup.py
2
setup.py
|
@ -7,7 +7,7 @@
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
NAME = "vsts-cd-manager"
|
||||
VERSION = "0.117.2"
|
||||
VERSION = "0.117.3"
|
||||
|
||||
# To install the library, run the following
|
||||
#
|
||||
|
|
|
@ -12,7 +12,7 @@ try:
|
|||
except ImportError:
|
||||
from urllib import quote #pylint: disable=no-name-in-module
|
||||
from urlparse import urlparse #pylint: disable=import-error
|
||||
from azuretfs import VstsInfoProvider
|
||||
from vsts_info_provider import VstsInfoProvider
|
||||
from continuous_delivery import ContinuousDelivery
|
||||
from continuous_delivery.models import (AuthorizationInfo, AuthorizationInfoParameters, BuildConfiguration,
|
||||
CiArtifact, CiConfiguration, ProvisioningConfiguration,
|
||||
|
|
|
@ -5,11 +5,10 @@
|
|||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from .azure_tfs import AzureTfs
|
||||
from .vsts_info_provider import VstsInfoProvider
|
||||
from .version import VERSION
|
||||
|
||||
__all__ = ['AzureTfs', 'VstsInfoProvider']
|
||||
__all__ = ['VstsInfoProvider']
|
||||
|
||||
__version__ = VERSION
|
||||
|
|
@ -5,7 +5,14 @@
|
|||
# regenerated.
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
from msrest.authentication import (
|
||||
BasicAuthentication,
|
||||
BasicTokenAuthentication,
|
||||
OAuthTokenAuthentication)
|
||||
from .collection_info import CollectionInfo
|
||||
from .repository_info import RepositoryInfo
|
||||
from .team_project_info import TeamProjectInfo
|
||||
from .vsts_info import VstsInfo
|
||||
|
||||
__all__ = [
|
||||
'CollectionInfo',
|
||||
'RepositoryInfo',
|
||||
'TeamProjectInfo',
|
||||
'VstsInfo',
|
||||
]
|
|
@ -6,12 +6,41 @@
|
|||
# --------------------------------------------------------------------------
|
||||
|
||||
from __future__ import print_function
|
||||
from sys import stderr
|
||||
from msrest.service_client import ServiceClient
|
||||
from msrest import Serializer, Deserializer
|
||||
from msrest import Configuration, Serializer, Deserializer
|
||||
from msrest.pipeline import ClientRawResponse
|
||||
from msrest.exceptions import HttpOperationError
|
||||
from . import models
|
||||
from .azure_tfs import AzureTfsConfiguration
|
||||
from .version import VERSION
|
||||
|
||||
|
||||
class VstsInfoProviderConfiguration(Configuration):
|
||||
"""Configuration for VstsInfoProvider
|
||||
Note that all parameters used to create this instance are saved as instance
|
||||
attributes.
|
||||
|
||||
:param api_version: Version of the API to use. This should be set to
|
||||
'3.2-preview' to use this version of the api.
|
||||
:type api_version: str
|
||||
:param str base_url: Service URL
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self, api_version, base_url=None):
|
||||
|
||||
if api_version is None:
|
||||
raise ValueError("Parameter 'api_version' must not be None.")
|
||||
if not isinstance(api_version, str):
|
||||
raise TypeError("Parameter 'api_version' must be str.")
|
||||
if not base_url:
|
||||
base_url = 'https://{}.visualstudio.com/'
|
||||
|
||||
super(AzureTfsConfiguration, self).__init__(base_url)
|
||||
|
||||
self.add_user_agent('azurecli/{} vstsinfo/{}'.format(VERSION, VERSION))
|
||||
|
||||
self.api_version = api_version
|
||||
|
||||
|
||||
class VstsInfoProvider(object):
|
||||
|
@ -47,7 +76,7 @@ class VstsInfoProvider(object):
|
|||
:param operation_config: :ref:`Operation configuration
|
||||
overrides<msrest:optionsforoperations>`.
|
||||
:rtype: :class:`ContinuousDeploymentOperation
|
||||
<azuretfs.models.ContinuousDeploymentOperation>`
|
||||
<vsts_info_provider.models.ContinuousDeploymentOperation>`
|
||||
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
|
||||
if raw=true
|
||||
:raises:
|
||||
|
@ -69,8 +98,8 @@ class VstsInfoProvider(object):
|
|||
request = self._client.get(url, query_parameters)
|
||||
response = self._client.send(request, header_parameters, **operation_config)
|
||||
if response.status_code not in [200]:
|
||||
print("response:", response.status_code)
|
||||
print(response.text)
|
||||
print("response:", response.status_code, file=stderr)
|
||||
print(response.text, file=stderr)
|
||||
raise HttpOperationError(self._deserialize, response)
|
||||
|
||||
deserialized = None
|
Загрузка…
Ссылка в новой задаче