Skip to content
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 @@ -83,6 +83,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2019-05-01: :mod:`v2019_05_01.models<azure.mgmt.containerregistry.v2019_05_01.models>`
* 2019-05-01-preview: :mod:`v2019_05_01_preview.models<azure.mgmt.containerregistry.v2019_05_01_preview.models>`
* 2019-06-01-preview: :mod:`v2019_06_01_preview.models<azure.mgmt.containerregistry.v2019_06_01_preview.models>`
* 2019-12-01-preview: :mod:`v2019_12_01_preview.models<azure.mgmt.containerregistry.v2019_12_01_preview.models>`
"""
if api_version == '2017-03-01':
from .v2017_03_01 import models
Expand All @@ -108,6 +109,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2019-06-01-preview':
from .v2019_06_01_preview import models
return models
elif api_version == '2019-12-01-preview':
from .v2019_12_01_preview import models
return models
raise NotImplementedError("APIVersion {} is not available".format(api_version))

@property
Expand Down Expand Up @@ -161,6 +165,7 @@ def operations(self):
* 2019-05-01: :class:`Operations<azure.mgmt.containerregistry.v2019_05_01.operations.Operations>`
* 2019-05-01-preview: :class:`Operations<azure.mgmt.containerregistry.v2019_05_01_preview.operations.Operations>`
* 2019-06-01-preview: :class:`Operations<azure.mgmt.containerregistry.v2019_06_01_preview.operations.Operations>`
* 2019-12-01-preview: :class:`Operations<azure.mgmt.containerregistry.v2019_12_01_preview.operations.Operations>`
"""
api_version = self._get_api_version('operations')
if api_version == '2017-03-01':
Expand All @@ -179,6 +184,8 @@ def operations(self):
from .v2019_05_01_preview.operations import Operations as OperationClass
elif api_version == '2019-06-01-preview':
from .v2019_06_01_preview.operations import Operations as OperationClass
elif api_version == '2019-12-01-preview':
from .v2019_12_01_preview.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 @@ -195,6 +202,7 @@ def registries(self):
* 2019-05-01: :class:`RegistriesOperations<azure.mgmt.containerregistry.v2019_05_01.operations.RegistriesOperations>`
* 2019-05-01-preview: :class:`RegistriesOperations<azure.mgmt.containerregistry.v2019_05_01_preview.operations.RegistriesOperations>`
* 2019-06-01-preview: :class:`RegistriesOperations<azure.mgmt.containerregistry.v2019_06_01_preview.operations.RegistriesOperations>`
* 2019-12-01-preview: :class:`RegistriesOperations<azure.mgmt.containerregistry.v2019_12_01_preview.operations.RegistriesOperations>`
"""
api_version = self._get_api_version('registries')
if api_version == '2017-03-01':
Expand All @@ -213,6 +221,8 @@ def registries(self):
from .v2019_05_01_preview.operations import RegistriesOperations as OperationClass
elif api_version == '2019-06-01-preview':
from .v2019_06_01_preview.operations import RegistriesOperations as OperationClass
elif api_version == '2019-12-01-preview':
from .v2019_12_01_preview.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 @@ -228,6 +238,7 @@ def replications(self):
* 2019-05-01: :class:`ReplicationsOperations<azure.mgmt.containerregistry.v2019_05_01.operations.ReplicationsOperations>`
* 2019-05-01-preview: :class:`ReplicationsOperations<azure.mgmt.containerregistry.v2019_05_01_preview.operations.ReplicationsOperations>`
* 2019-06-01-preview: :class:`ReplicationsOperations<azure.mgmt.containerregistry.v2019_06_01_preview.operations.ReplicationsOperations>`
* 2019-12-01-preview: :class:`ReplicationsOperations<azure.mgmt.containerregistry.v2019_12_01_preview.operations.ReplicationsOperations>`
"""
api_version = self._get_api_version('replications')
if api_version == '2017-10-01':
Expand All @@ -244,6 +255,8 @@ def replications(self):
from .v2019_05_01_preview.operations import ReplicationsOperations as OperationClass
elif api_version == '2019-06-01-preview':
from .v2019_06_01_preview.operations import ReplicationsOperations as OperationClass
elif api_version == '2019-12-01-preview':
from .v2019_12_01_preview.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)))
Expand Down Expand Up @@ -348,6 +361,7 @@ def webhooks(self):
* 2019-05-01: :class:`WebhooksOperations<azure.mgmt.containerregistry.v2019_05_01.operations.WebhooksOperations>`
* 2019-05-01-preview: :class:`WebhooksOperations<azure.mgmt.containerregistry.v2019_05_01_preview.operations.WebhooksOperations>`
* 2019-06-01-preview: :class:`WebhooksOperations<azure.mgmt.containerregistry.v2019_06_01_preview.operations.WebhooksOperations>`
* 2019-12-01-preview: :class:`WebhooksOperations<azure.mgmt.containerregistry.v2019_12_01_preview.operations.WebhooksOperations>`
"""
api_version = self._get_api_version('webhooks')
if api_version == '2017-10-01':
Expand All @@ -364,6 +378,8 @@ def webhooks(self):
from .v2019_05_01_preview.operations import WebhooksOperations as OperationClass
elif api_version == '2019-06-01-preview':
from .v2019_06_01_preview.operations import WebhooksOperations as OperationClass
elif api_version == '2019-12-01-preview':
from .v2019_12_01_preview.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
@@ -0,0 +1,19 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from ._configuration import ContainerRegistryManagementClientConfiguration
from ._container_registry_management_client import ContainerRegistryManagementClient
__all__ = ['ContainerRegistryManagementClient', 'ContainerRegistryManagementClientConfiguration']

from .version import VERSION

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from msrestazure import AzureConfiguration

from .version import VERSION


class ContainerRegistryManagementClientConfiguration(AzureConfiguration):
"""Configuration for ContainerRegistryManagementClient
Note that all parameters used to create this instance are saved as instance
attributes.

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: The Microsoft Azure subscription ID.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

super(ContainerRegistryManagementClientConfiguration, self).__init__(base_url)

# Starting Autorest.Python 4.0.64, make connection pool activated by default
self.keep_alive = True

self.add_user_agent('azure-mgmt-containerregistry/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer

from ._configuration import ContainerRegistryManagementClientConfiguration
from .operations import RegistriesOperations
from .operations import Operations
from .operations import ReplicationsOperations
from .operations import WebhooksOperations
from . import models


class ContainerRegistryManagementClient(SDKClient):
"""ContainerRegistryManagementClient

:ivar config: Configuration for client.
:vartype config: ContainerRegistryManagementClientConfiguration

:ivar registries: Registries operations
:vartype registries: azure.mgmt.containerregistry.v2019_12_01_preview.operations.RegistriesOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.containerregistry.v2019_12_01_preview.operations.Operations
:ivar replications: Replications operations
:vartype replications: azure.mgmt.containerregistry.v2019_12_01_preview.operations.ReplicationsOperations
:ivar webhooks: Webhooks operations
:vartype webhooks: azure.mgmt.containerregistry.v2019_12_01_preview.operations.WebhooksOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: The Microsoft Azure subscription ID.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

self.config = ContainerRegistryManagementClientConfiguration(credentials, subscription_id, base_url)
super(ContainerRegistryManagementClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2019-12-01-preview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.registries = RegistriesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.replications = ReplicationsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.webhooks = WebhooksOperations(
self._client, self.config, self._serialize, self._deserialize)
Loading