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 track2_azure-mgmt-containerregistry] Update readme.python.md #8624

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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 5 additions & 5 deletions sdk/containerregistry/azure-mgmt-containerregistry/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"autorest": "3.4.5",
"autorest": "3.7.2",
"use": [
"@autorest/python@5.8.4",
"@autorest/[email protected].2"
"@autorest/python@5.12.0",
"@autorest/[email protected].3"
],
"commit": "99d3931e458882c3402aad2f971e46e961a1e78c",
"commit": "e9dc2849200de531154b886ff09bf40da25fd172",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/containerregistry/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/[email protected].2 --version=3.4.5",
"autorest_command": "autorest specification/containerregistry/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/[email protected].3 --version=3.7.2",
"readme": "specification/containerregistry/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy

from ._version import VERSION

Expand Down Expand Up @@ -68,4 +68,4 @@ def _configure(
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get('authentication_policy')
if self.credential and not self.authentication_policy:
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from typing import Any, Optional

from azure.core.credentials import TokenCredential
from azure.core.pipeline.transport import HttpRequest, HttpResponse

class _SDKClient(object):
def __init__(self, *args, **kwargs):
Expand Down Expand Up @@ -56,16 +55,24 @@ class ContainerRegistryManagementClient(MultiApiClientMixin, _SDKClient):
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
"""

DEFAULT_API_VERSION = '2019-05-01'
DEFAULT_API_VERSION = '2021-09-01'
_PROFILE_TAG = "azure.mgmt.containerregistry.ContainerRegistryManagementClient"
LATEST_PROFILE = ProfileDefinition({
_PROFILE_TAG: {
None: DEFAULT_API_VERSION,
'agent_pools': '2019-06-01-preview',
'build_steps': '2018-02-01-preview',
'build_tasks': '2018-02-01-preview',
'builds': '2018-02-01-preview',
'connected_registries': '2021-08-01-preview',
'export_pipelines': '2021-08-01-preview',
'import_pipelines': '2021-08-01-preview',
'pipeline_runs': '2021-08-01-preview',
'runs': '2019-04-01',
'scope_maps': '2021-08-01-preview',
'task_runs': '2019-06-01-preview',
'tasks': '2019-04-01',
'tokens': '2021-08-01-preview',
}},
_PROFILE_TAG + " latest"
)
Expand All @@ -75,12 +82,10 @@ def __init__(
credential, # type: "TokenCredential"
subscription_id, # type: str
api_version=None, # type: Optional[str]
base_url=None, # type: Optional[str]
base_url="https://management.azure.com", # type: str
profile=KnownProfiles.default, # type: KnownProfiles
**kwargs # type: Any
):
if not base_url:
base_url = 'https://management.azure.com'
self._config = ContainerRegistryManagementClientConfiguration(credential, subscription_id, **kwargs)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
super(ContainerRegistryManagementClient, self).__init__(
Expand Down Expand Up @@ -108,6 +113,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2020-11-01-preview: :mod:`v2020_11_01_preview.models<azure.mgmt.containerregistry.v2020_11_01_preview.models>`
* 2021-06-01-preview: :mod:`v2021_06_01_preview.models<azure.mgmt.containerregistry.v2021_06_01_preview.models>`
* 2021-08-01-preview: :mod:`v2021_08_01_preview.models<azure.mgmt.containerregistry.v2021_08_01_preview.models>`
* 2021-09-01: :mod:`v2021_09_01.models<azure.mgmt.containerregistry.v2021_09_01.models>`
"""
if api_version == '2017-03-01':
from .v2017_03_01 import models
Expand Down Expand Up @@ -145,6 +151,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2021-08-01-preview':
from .v2021_08_01_preview import models
return models
elif api_version == '2021-09-01':
from .v2021_09_01 import models
return models
raise ValueError("API version {} is not available".format(api_version))

@property
Expand Down Expand Up @@ -273,6 +282,7 @@ def operations(self):
* 2020-11-01-preview: :class:`Operations<azure.mgmt.containerregistry.v2020_11_01_preview.operations.Operations>`
* 2021-06-01-preview: :class:`Operations<azure.mgmt.containerregistry.v2021_06_01_preview.operations.Operations>`
* 2021-08-01-preview: :class:`Operations<azure.mgmt.containerregistry.v2021_08_01_preview.operations.Operations>`
* 2021-09-01: :class:`Operations<azure.mgmt.containerregistry.v2021_09_01.operations.Operations>`
"""
api_version = self._get_api_version('operations')
if api_version == '2017-03-01':
Expand All @@ -289,6 +299,8 @@ def operations(self):
from .v2021_06_01_preview.operations import Operations as OperationClass
elif api_version == '2021-08-01-preview':
from .v2021_08_01_preview.operations import Operations as OperationClass
elif api_version == '2021-09-01':
from .v2021_09_01.operations import Operations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'operations'".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 @@ -323,6 +335,7 @@ def private_endpoint_connections(self):
* 2020-11-01-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.containerregistry.v2020_11_01_preview.operations.PrivateEndpointConnectionsOperations>`
* 2021-06-01-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.containerregistry.v2021_06_01_preview.operations.PrivateEndpointConnectionsOperations>`
* 2021-08-01-preview: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.containerregistry.v2021_08_01_preview.operations.PrivateEndpointConnectionsOperations>`
* 2021-09-01: :class:`PrivateEndpointConnectionsOperations<azure.mgmt.containerregistry.v2021_09_01.operations.PrivateEndpointConnectionsOperations>`
"""
api_version = self._get_api_version('private_endpoint_connections')
if api_version == '2019-12-01-preview':
Expand All @@ -333,6 +346,8 @@ def private_endpoint_connections(self):
from .v2021_06_01_preview.operations import PrivateEndpointConnectionsOperations as OperationClass
elif api_version == '2021-08-01-preview':
from .v2021_08_01_preview.operations import PrivateEndpointConnectionsOperations as OperationClass
elif api_version == '2021-09-01':
from .v2021_09_01.operations import PrivateEndpointConnectionsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -353,6 +368,7 @@ def registries(self):
* 2020-11-01-preview: :class:`RegistriesOperations<azure.mgmt.containerregistry.v2020_11_01_preview.operations.RegistriesOperations>`
* 2021-06-01-preview: :class:`RegistriesOperations<azure.mgmt.containerregistry.v2021_06_01_preview.operations.RegistriesOperations>`
* 2021-08-01-preview: :class:`RegistriesOperations<azure.mgmt.containerregistry.v2021_08_01_preview.operations.RegistriesOperations>`
* 2021-09-01: :class:`RegistriesOperations<azure.mgmt.containerregistry.v2021_09_01.operations.RegistriesOperations>`
"""
api_version = self._get_api_version('registries')
if api_version == '2017-03-01':
Expand All @@ -379,6 +395,8 @@ def registries(self):
from .v2021_06_01_preview.operations import RegistriesOperations as OperationClass
elif api_version == '2021-08-01-preview':
from .v2021_08_01_preview.operations import RegistriesOperations as OperationClass
elif api_version == '2021-09-01':
from .v2021_09_01.operations import RegistriesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'registries'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand All @@ -393,6 +411,7 @@ def replications(self):
* 2020-11-01-preview: :class:`ReplicationsOperations<azure.mgmt.containerregistry.v2020_11_01_preview.operations.ReplicationsOperations>`
* 2021-06-01-preview: :class:`ReplicationsOperations<azure.mgmt.containerregistry.v2021_06_01_preview.operations.ReplicationsOperations>`
* 2021-08-01-preview: :class:`ReplicationsOperations<azure.mgmt.containerregistry.v2021_08_01_preview.operations.ReplicationsOperations>`
* 2021-09-01: :class:`ReplicationsOperations<azure.mgmt.containerregistry.v2021_09_01.operations.ReplicationsOperations>`
"""
api_version = self._get_api_version('replications')
if api_version == '2017-10-01':
Expand All @@ -407,6 +426,8 @@ def replications(self):
from .v2021_06_01_preview.operations import ReplicationsOperations as OperationClass
elif api_version == '2021-08-01-preview':
from .v2021_08_01_preview.operations import ReplicationsOperations as OperationClass
elif api_version == '2021-09-01':
from .v2021_09_01.operations import ReplicationsOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'replications'".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 @@ -516,6 +537,7 @@ def webhooks(self):
* 2020-11-01-preview: :class:`WebhooksOperations<azure.mgmt.containerregistry.v2020_11_01_preview.operations.WebhooksOperations>`
* 2021-06-01-preview: :class:`WebhooksOperations<azure.mgmt.containerregistry.v2021_06_01_preview.operations.WebhooksOperations>`
* 2021-08-01-preview: :class:`WebhooksOperations<azure.mgmt.containerregistry.v2021_08_01_preview.operations.WebhooksOperations>`
* 2021-09-01: :class:`WebhooksOperations<azure.mgmt.containerregistry.v2021_09_01.operations.WebhooksOperations>`
"""
api_version = self._get_api_version('webhooks')
if api_version == '2017-10-01':
Expand All @@ -530,6 +552,8 @@ def webhooks(self):
from .v2021_06_01_preview.operations import WebhooksOperations as OperationClass
elif api_version == '2021-08-01-preview':
from .v2021_08_01_preview.operations import WebhooksOperations as OperationClass
elif api_version == '2021-09-01':
from .v2021_09_01.operations import WebhooksOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'webhooks'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy
from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy

from .._version import VERSION

Expand Down Expand Up @@ -64,4 +64,4 @@ def _configure(
self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get('authentication_policy')
if self.credential and not self.authentication_policy:
self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
Loading