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 @@ -275,10 +275,13 @@ def scope_maps(self):
"""Instance depends on the API version:

* 2019-05-01-preview: :class:`ScopeMapsOperations<azure.mgmt.containerregistry.v2019_05_01_preview.operations.ScopeMapsOperations>`
* 2019-06-01-preview: :class:`ScopeMapsOperations<azure.mgmt.containerregistry.v2019_06_01_preview.operations.ScopeMapsOperations>`
"""
api_version = self._get_api_version('scope_maps')
if api_version == '2019-05-01-preview':
from .v2019_05_01_preview.operations import ScopeMapsOperations as OperationClass
elif api_version == '2019-06-01-preview':
from .v2019_06_01_preview.operations import ScopeMapsOperations 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 @@ -310,10 +313,13 @@ def tokens(self):
"""Instance depends on the API version:

* 2019-05-01-preview: :class:`TokensOperations<azure.mgmt.containerregistry.v2019_05_01_preview.operations.TokensOperations>`
* 2019-06-01-preview: :class:`TokensOperations<azure.mgmt.containerregistry.v2019_06_01_preview.operations.TokensOperations>`
"""
api_version = self._get_api_version('tokens')
if api_version == '2019-05-01-preview':
from .v2019_05_01_preview.operations import TokensOperations as OperationClass
elif api_version == '2019-06-01-preview':
from .v2019_06_01_preview.operations import TokensOperations 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
Original file line number Diff line number Diff line change
Expand Up @@ -1556,7 +1556,7 @@ def __init__(self, **kwargs):


class OperationServiceSpecificationDefinition(Model):
"""The definition of Azure Monitoring metrics list.
"""The definition of Azure Monitoring list.

:param metric_specifications: A list of Azure Monitoring metrics
definition.
Expand Down Expand Up @@ -1702,7 +1702,8 @@ class QuarantinePolicy(Model):
"""The quarantine policy for a container registry.

:param status: The value that indicates whether the policy is enabled or
not. Possible values include: 'enabled', 'disabled'
not. Possible values include: 'enabled', 'disabled'. Default value:
"disabled" .
:type status: str or
~azure.mgmt.containerregistry.v2019_05_01.models.PolicyStatus
"""
Expand All @@ -1713,7 +1714,7 @@ class QuarantinePolicy(Model):

def __init__(self, **kwargs):
super(QuarantinePolicy, self).__init__(**kwargs)
self.status = kwargs.get('status', None)
self.status = kwargs.get('status', "disabled")


class RegenerateCredentialParameters(Model):
Expand Down Expand Up @@ -2172,12 +2173,14 @@ class RetentionPolicy(Model):
Variables are only populated by the server, and will be ignored when
sending a request.

:param days: The number of days to retain manifest before it expires.
:param days: The number of days to retain an untagged manifest after which
it gets purged. Default value: 7 .
:type days: int
:ivar last_updated_time: The timestamp when the policy was last updated.
:vartype last_updated_time: datetime
:param status: The value that indicates whether the policy is enabled or
not. Possible values include: 'enabled', 'disabled'
not. Possible values include: 'enabled', 'disabled'. Default value:
"disabled" .
:type status: str or
~azure.mgmt.containerregistry.v2019_05_01.models.PolicyStatus
"""
Expand All @@ -2194,9 +2197,9 @@ class RetentionPolicy(Model):

def __init__(self, **kwargs):
super(RetentionPolicy, self).__init__(**kwargs)
self.days = kwargs.get('days', None)
self.days = kwargs.get('days', 7)
self.last_updated_time = None
self.status = kwargs.get('status', None)
self.status = kwargs.get('status', "disabled")


class Run(ProxyResource):
Expand Down Expand Up @@ -3216,11 +3219,13 @@ def __init__(self, **kwargs):
class TrustPolicy(Model):
"""The content trust policy for a container registry.

:param type: The type of trust policy. Possible values include: 'Notary'
:param type: The type of trust policy. Possible values include: 'Notary'.
Default value: "Notary" .
:type type: str or
~azure.mgmt.containerregistry.v2019_05_01.models.TrustPolicyType
:param status: The value that indicates whether the policy is enabled or
not. Possible values include: 'enabled', 'disabled'
not. Possible values include: 'enabled', 'disabled'. Default value:
"disabled" .
:type status: str or
~azure.mgmt.containerregistry.v2019_05_01.models.PolicyStatus
"""
Expand All @@ -3232,8 +3237,8 @@ class TrustPolicy(Model):

def __init__(self, **kwargs):
super(TrustPolicy, self).__init__(**kwargs)
self.type = kwargs.get('type', None)
self.status = kwargs.get('status', None)
self.type = kwargs.get('type', "Notary")
self.status = kwargs.get('status', "disabled")


class UserIdentityProperties(Model):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1556,7 +1556,7 @@ def __init__(self, *, name: str=None, display_name: str=None, display_descriptio


class OperationServiceSpecificationDefinition(Model):
"""The definition of Azure Monitoring metrics list.
"""The definition of Azure Monitoring list.

:param metric_specifications: A list of Azure Monitoring metrics
definition.
Expand Down Expand Up @@ -1702,7 +1702,8 @@ class QuarantinePolicy(Model):
"""The quarantine policy for a container registry.

:param status: The value that indicates whether the policy is enabled or
not. Possible values include: 'enabled', 'disabled'
not. Possible values include: 'enabled', 'disabled'. Default value:
"disabled" .
:type status: str or
~azure.mgmt.containerregistry.v2019_05_01.models.PolicyStatus
"""
Expand All @@ -1711,7 +1712,7 @@ class QuarantinePolicy(Model):
'status': {'key': 'status', 'type': 'str'},
}

def __init__(self, *, status=None, **kwargs) -> None:
def __init__(self, *, status="disabled", **kwargs) -> None:
super(QuarantinePolicy, self).__init__(**kwargs)
self.status = status

Expand Down Expand Up @@ -2172,12 +2173,14 @@ class RetentionPolicy(Model):
Variables are only populated by the server, and will be ignored when
sending a request.

:param days: The number of days to retain manifest before it expires.
:param days: The number of days to retain an untagged manifest after which
it gets purged. Default value: 7 .
:type days: int
:ivar last_updated_time: The timestamp when the policy was last updated.
:vartype last_updated_time: datetime
:param status: The value that indicates whether the policy is enabled or
not. Possible values include: 'enabled', 'disabled'
not. Possible values include: 'enabled', 'disabled'. Default value:
"disabled" .
:type status: str or
~azure.mgmt.containerregistry.v2019_05_01.models.PolicyStatus
"""
Expand All @@ -2192,7 +2195,7 @@ class RetentionPolicy(Model):
'status': {'key': 'status', 'type': 'str'},
}

def __init__(self, *, days: int=None, status=None, **kwargs) -> None:
def __init__(self, *, days: int=7, status="disabled", **kwargs) -> None:
super(RetentionPolicy, self).__init__(**kwargs)
self.days = days
self.last_updated_time = None
Expand Down Expand Up @@ -3216,11 +3219,13 @@ def __init__(self, *, timer_triggers=None, source_triggers=None, base_image_trig
class TrustPolicy(Model):
"""The content trust policy for a container registry.

:param type: The type of trust policy. Possible values include: 'Notary'
:param type: The type of trust policy. Possible values include: 'Notary'.
Default value: "Notary" .
:type type: str or
~azure.mgmt.containerregistry.v2019_05_01.models.TrustPolicyType
:param status: The value that indicates whether the policy is enabled or
not. Possible values include: 'enabled', 'disabled'
not. Possible values include: 'enabled', 'disabled'. Default value:
"disabled" .
:type status: str or
~azure.mgmt.containerregistry.v2019_05_01.models.PolicyStatus
"""
Expand All @@ -3230,7 +3235,7 @@ class TrustPolicy(Model):
'status': {'key': 'status', 'type': 'str'},
}

def __init__(self, *, type=None, status=None, **kwargs) -> None:
def __init__(self, *, type="Notary", status="disabled", **kwargs) -> None:
super(TrustPolicy, self).__init__(**kwargs)
self.type = type
self.status = status
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
from ._models_py3 import ScopeMapUpdateParameters
from ._models_py3 import Sku
from ._models_py3 import Source
from ._models_py3 import Status1
from ._models_py3 import Status
from ._models_py3 import StorageAccountProperties
from ._models_py3 import Target
from ._models_py3 import Token
Expand Down Expand Up @@ -100,7 +100,7 @@
from ._models import ScopeMapUpdateParameters
from ._models import Sku
from ._models import Source
from ._models import Status1
from ._models import Status
from ._models import StorageAccountProperties
from ._models import Target
from ._models import Token
Expand Down Expand Up @@ -135,7 +135,7 @@
WebhookAction,
TokenCertificateName,
TokenPasswordName,
Status,
TokenStatus,
)

__all__ = [
Expand Down Expand Up @@ -177,7 +177,7 @@
'ScopeMapUpdateParameters',
'Sku',
'Source',
'Status1',
'Status',
'StorageAccountProperties',
'Target',
'Token',
Expand Down Expand Up @@ -211,5 +211,5 @@
'WebhookAction',
'TokenCertificateName',
'TokenPasswordName',
'Status',
'TokenStatus',
]
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class TokenPasswordName(str, Enum):
password2 = "password2"


class Status(str, Enum):
class TokenStatus(str, Enum):

enabled = "enabled"
disabled = "disabled"
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ class GenerateCredentialsParameters(Model):
"9999-12-31T15:59:59.9999999-08:00" .
:type expiry: datetime
:param name: Specifies name of the password which should be regenerated if
any -- password or password2. Possible values include: 'password1',
any -- password1 or password2. Possible values include: 'password1',
'password2'
:type name: str or
~azure.mgmt.containerregistry.v2019_05_01_preview.models.TokenPasswordName
Expand Down Expand Up @@ -717,7 +717,7 @@ class Registry(Resource):
:ivar status: The status of the container registry at the time the
operation was called.
:vartype status:
~azure.mgmt.containerregistry.v2019_05_01_preview.models.Status1
~azure.mgmt.containerregistry.v2019_05_01_preview.models.Status
:param admin_user_enabled: The value that indicates whether the admin user
is enabled. Default value: False .
:type admin_user_enabled: bool
Expand Down Expand Up @@ -752,7 +752,7 @@ class Registry(Resource):
'login_server': {'key': 'properties.loginServer', 'type': 'str'},
'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'status': {'key': 'properties.status', 'type': 'Status1'},
'status': {'key': 'properties.status', 'type': 'Status'},
'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'},
'storage_account': {'key': 'properties.storageAccount', 'type': 'StorageAccountProperties'},
'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'},
Expand Down Expand Up @@ -1009,7 +1009,7 @@ class Replication(Resource):
:ivar status: The status of the replication at the time the operation was
called.
:vartype status:
~azure.mgmt.containerregistry.v2019_05_01_preview.models.Status1
~azure.mgmt.containerregistry.v2019_05_01_preview.models.Status
"""

_validation = {
Expand All @@ -1028,7 +1028,7 @@ class Replication(Resource):
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'status': {'key': 'properties.status', 'type': 'Status1'},
'status': {'key': 'properties.status', 'type': 'Status'},
}

def __init__(self, **kwargs):
Expand Down Expand Up @@ -1115,8 +1115,8 @@ class ScopeMap(ProxyResource):
~azure.mgmt.containerregistry.v2019_05_01_preview.models.ProvisioningState
:param actions: Required. The list of scoped permissions for registry
artifacts.
E.g. repositories/repository-name/pull,
repositories/repository-name/delete
E.g. repositories/repository-name/content/read,
repositories/repository-name/metadata/write
:type actions: list[str]
"""

Expand Down Expand Up @@ -1231,7 +1231,7 @@ def __init__(self, **kwargs):
self.instance_id = kwargs.get('instance_id', None)


class Status1(Model):
class Status(Model):
"""The status of an Azure resource at the time the operation was called.

Variables are only populated by the server, and will be ignored when
Expand Down Expand Up @@ -1260,7 +1260,7 @@ class Status1(Model):
}

def __init__(self, **kwargs):
super(Status1, self).__init__(**kwargs)
super(Status, self).__init__(**kwargs)
self.display_status = None
self.message = None
self.timestamp = None
Expand Down Expand Up @@ -1370,7 +1370,7 @@ class Token(ProxyResource):
:param status: The status of the token example enabled or disabled.
Possible values include: 'enabled', 'disabled'
:type status: str or
~azure.mgmt.containerregistry.v2019_05_01_preview.models.Status
~azure.mgmt.containerregistry.v2019_05_01_preview.models.TokenStatus
"""

_validation = {
Expand Down Expand Up @@ -1463,11 +1463,11 @@ class TokenPassword(Model):
Variables are only populated by the server, and will be ignored when
sending a request.

:param creation_time: The password created datetime of the password.
:param creation_time: The creation datetime of the password.
:type creation_time: datetime
:param expiry: The expiry datetime of the password.
:type expiry: datetime
:param name: The password name "password" or "password2". Possible values
:param name: The password name "password1" or "password2". Possible values
include: 'password1', 'password2'
:type name: str or
~azure.mgmt.containerregistry.v2019_05_01_preview.models.TokenPasswordName
Expand Down Expand Up @@ -1503,7 +1503,7 @@ class TokenUpdateParameters(Model):
:param status: The status of the token example enabled or disabled.
Possible values include: 'enabled', 'disabled'
:type status: str or
~azure.mgmt.containerregistry.v2019_05_01_preview.models.Status
~azure.mgmt.containerregistry.v2019_05_01_preview.models.TokenStatus
:param credentials: The credentials that can be used for authenticating
the token.
:type credentials:
Expand Down
Loading