Skip to content
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

[AutoPR containerregistry/resource-manager] Azure container registry build feature GA API specification and examples. #3119

Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -97,27 +97,31 @@ def models(cls, api_version=DEFAULT_API_VERSION):

* 2017-03-01: :mod:`v2017_03_01.models<azure.mgmt.containerregistry.v2017_03_01.models>`
* 2017-10-01: :mod:`v2017_10_01.models<azure.mgmt.containerregistry.v2017_10_01.models>`
* 2018-02-01-preview: :mod:`v2018_02_01_preview.models<azure.mgmt.containerregistry.v2018_02_01_preview.models>`
* 2017-10-01: :mod:`v2018_02_01_preview.models<azure.mgmt.containerregistry.v2018_02_01_preview.models>`
* 2017-10-01: :mod:`v2018_09_01.models<azure.mgmt.containerregistry.v2018_09_01.models>`
"""
if api_version == '2017-03-01':
from .v2017_03_01 import models
return models
elif api_version == '2017-10-01':
from .v2017_10_01 import models
return models
elif api_version == '2018-02-01-preview':
elif api_version == '2017-10-01':
from .v2018_02_01_preview import models
return models
elif api_version == '2017-10-01':
from .v2018_09_01 import models
return models
raise NotImplementedError("APIVersion {} is not available".format(api_version))

@property
def build_steps(self):
"""Instance depends on the API version:

* 2018-02-01-preview: :class:`BuildStepsOperations<azure.mgmt.containerregistry.v2018_02_01_preview.operations.BuildStepsOperations>`
* 2017-10-01: :class:`BuildStepsOperations<azure.mgmt.containerregistry.v2018_02_01_preview.operations.BuildStepsOperations>`
"""
api_version = self._get_api_version('build_steps')
if api_version == '2018-02-01-preview':
if api_version == '2017-10-01':
from .v2018_02_01_preview.operations import BuildStepsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
Expand All @@ -127,10 +131,10 @@ def build_steps(self):
def build_tasks(self):
"""Instance depends on the API version:

* 2018-02-01-preview: :class:`BuildTasksOperations<azure.mgmt.containerregistry.v2018_02_01_preview.operations.BuildTasksOperations>`
* 2017-10-01: :class:`BuildTasksOperations<azure.mgmt.containerregistry.v2018_02_01_preview.operations.BuildTasksOperations>`
"""
api_version = self._get_api_version('build_tasks')
if api_version == '2018-02-01-preview':
if api_version == '2017-10-01':
from .v2018_02_01_preview.operations import BuildTasksOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
Expand All @@ -140,10 +144,10 @@ def build_tasks(self):
def builds(self):
"""Instance depends on the API version:

* 2018-02-01-preview: :class:`BuildsOperations<azure.mgmt.containerregistry.v2018_02_01_preview.operations.BuildsOperations>`
* 2017-10-01: :class:`BuildsOperations<azure.mgmt.containerregistry.v2018_02_01_preview.operations.BuildsOperations>`
"""
api_version = self._get_api_version('builds')
if api_version == '2018-02-01-preview':
if api_version == '2017-10-01':
from .v2018_02_01_preview.operations import BuildsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
Expand All @@ -155,15 +159,18 @@ def operations(self):

* 2017-03-01: :class:`Operations<azure.mgmt.containerregistry.v2017_03_01.operations.Operations>`
* 2017-10-01: :class:`Operations<azure.mgmt.containerregistry.v2017_10_01.operations.Operations>`
* 2018-02-01-preview: :class:`Operations<azure.mgmt.containerregistry.v2018_02_01_preview.operations.Operations>`
* 2017-10-01: :class:`Operations<azure.mgmt.containerregistry.v2018_02_01_preview.operations.Operations>`
* 2017-10-01: :class:`Operations<azure.mgmt.containerregistry.v2018_09_01.operations.Operations>`
"""
api_version = self._get_api_version('operations')
if api_version == '2017-03-01':
from .v2017_03_01.operations import Operations as OperationClass
elif api_version == '2017-10-01':
from .v2017_10_01.operations import Operations as OperationClass
elif api_version == '2018-02-01-preview':
elif api_version == '2017-10-01':
from .v2018_02_01_preview.operations import Operations as OperationClass
elif api_version == '2017-10-01':
from .v2018_09_01.operations import Operations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -174,15 +181,18 @@ def registries(self):

* 2017-03-01: :class:`RegistriesOperations<azure.mgmt.containerregistry.v2017_03_01.operations.RegistriesOperations>`
* 2017-10-01: :class:`RegistriesOperations<azure.mgmt.containerregistry.v2017_10_01.operations.RegistriesOperations>`
* 2018-02-01-preview: :class:`RegistriesOperations<azure.mgmt.containerregistry.v2018_02_01_preview.operations.RegistriesOperations>`
* 2017-10-01: :class:`RegistriesOperations<azure.mgmt.containerregistry.v2018_02_01_preview.operations.RegistriesOperations>`
* 2017-10-01: :class:`RegistriesOperations<azure.mgmt.containerregistry.v2018_09_01.operations.RegistriesOperations>`
"""
api_version = self._get_api_version('registries')
if api_version == '2017-03-01':
from .v2017_03_01.operations import RegistriesOperations as OperationClass
elif api_version == '2017-10-01':
from .v2017_10_01.operations import RegistriesOperations as OperationClass
elif api_version == '2018-02-01-preview':
elif api_version == '2017-10-01':
from .v2018_02_01_preview.operations import RegistriesOperations as OperationClass
elif api_version == '2017-10-01':
from .v2018_09_01.operations import RegistriesOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -192,13 +202,42 @@ def replications(self):
"""Instance depends on the API version:

* 2017-10-01: :class:`ReplicationsOperations<azure.mgmt.containerregistry.v2017_10_01.operations.ReplicationsOperations>`
* 2018-02-01-preview: :class:`ReplicationsOperations<azure.mgmt.containerregistry.v2018_02_01_preview.operations.ReplicationsOperations>`
* 2017-10-01: :class:`ReplicationsOperations<azure.mgmt.containerregistry.v2018_02_01_preview.operations.ReplicationsOperations>`
* 2017-10-01: :class:`ReplicationsOperations<azure.mgmt.containerregistry.v2018_09_01.operations.ReplicationsOperations>`
"""
api_version = self._get_api_version('replications')
if api_version == '2017-10-01':
from .v2017_10_01.operations import ReplicationsOperations as OperationClass
elif api_version == '2018-02-01-preview':
elif api_version == '2017-10-01':
from .v2018_02_01_preview.operations import ReplicationsOperations as OperationClass
elif api_version == '2017-10-01':
from .v2018_09_01.operations import ReplicationsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def runs(self):
"""Instance depends on the API version:

* 2017-10-01: :class:`RunsOperations<azure.mgmt.containerregistry.v2018_09_01.operations.RunsOperations>`
"""
api_version = self._get_api_version('runs')
if api_version == '2017-10-01':
from .v2018_09_01.operations import RunsOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def tasks(self):
"""Instance depends on the API version:

* 2017-10-01: :class:`TasksOperations<azure.mgmt.containerregistry.v2018_09_01.operations.TasksOperations>`
"""
api_version = self._get_api_version('tasks')
if api_version == '2017-10-01':
from .v2018_09_01.operations import TasksOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -208,13 +247,16 @@ def webhooks(self):
"""Instance depends on the API version:

* 2017-10-01: :class:`WebhooksOperations<azure.mgmt.containerregistry.v2017_10_01.operations.WebhooksOperations>`
* 2018-02-01-preview: :class:`WebhooksOperations<azure.mgmt.containerregistry.v2018_02_01_preview.operations.WebhooksOperations>`
* 2017-10-01: :class:`WebhooksOperations<azure.mgmt.containerregistry.v2018_02_01_preview.operations.WebhooksOperations>`
* 2017-10-01: :class:`WebhooksOperations<azure.mgmt.containerregistry.v2018_09_01.operations.WebhooksOperations>`
"""
api_version = self._get_api_version('webhooks')
if api_version == '2017-10-01':
from .v2017_10_01.operations import WebhooksOperations as OperationClass
elif api_version == '2018-02-01-preview':
elif api_version == '2017-10-01':
from .v2018_02_01_preview.operations import WebhooksOperations as OperationClass
elif api_version == '2017-10-01':
from .v2018_09_01.operations import WebhooksOperations as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def internal_paging(next_link=None, raw=False):

# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
Expand All @@ -77,9 +77,8 @@ def internal_paging(next_link=None, raw=False):
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
request = self._client.get(url, query_parameters)
response = self._client.send(
request, header_parameters, stream=False, **operation_config)
request = self._client.get(url, query_parameters, header_parameters)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
exp = CloudError(response)
Expand Down
Loading