Skip to content

Commit

Permalink
T1 containerregistry 2021 02 24 (#16902)
Browse files Browse the repository at this point in the history
* CodeGen from PR 13001 in Azure/azure-rest-api-specs
acr: updating existing version to fix swagger quality issue in s360 (#13001)

* acr: updating existing version to fix swagger quality issue in s360

* add anonymous pull properties

Co-authored-by: Nelson Wu <[email protected]>

* test,version,CHANGELOG

* fix version

* fix version

Co-authored-by: SDKAuto <[email protected]>
Co-authored-by: Nelson Wu <[email protected]>
Co-authored-by: Yan Zhang (WICRESOFT NORTH AMERICA LTD) <[email protected]>
Co-authored-by: 00Kai0 <[email protected]>
  • Loading branch information
5 people authored Feb 25, 2021
1 parent ba12755 commit 35fecac
Show file tree
Hide file tree
Showing 15 changed files with 494 additions and 381 deletions.
12 changes: 12 additions & 0 deletions sdk/containerregistry/azure-mgmt-containerregistry/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Release History

## 3.0.0rc17 (2021-02-24)

**Features**

- Model OperationServiceSpecificationDefinition has a new parameter log_specifications
- Model Registry has a new parameter anonymous_pull_enabled
- Model RegistryUpdateParameters has a new parameter anonymous_pull_enabled

**Breaking changes**

- Model Registry no longer has parameter storage_account

## 3.0.0rc16 (2020-12-09)

**Features**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
from ._models_py3 import NetworkRuleSet
from ._models_py3 import OperationDefinition
from ._models_py3 import OperationDisplayDefinition
from ._models_py3 import OperationLogSpecificationDefinition
from ._models_py3 import OperationMetricSpecificationDefinition
from ._models_py3 import OperationServiceSpecificationDefinition
from ._models_py3 import OverrideTaskStepProperties
Expand Down Expand Up @@ -115,7 +116,6 @@
from ._models_py3 import SourceUpdateParameters
from ._models_py3 import SourceUploadDefinition
from ._models_py3 import Status
from ._models_py3 import StorageAccountProperties
from ._models_py3 import SystemData
from ._models_py3 import Target
from ._models_py3 import Task
Expand Down Expand Up @@ -192,6 +192,7 @@
from ._models import NetworkRuleSet
from ._models import OperationDefinition
from ._models import OperationDisplayDefinition
from ._models import OperationLogSpecificationDefinition
from ._models import OperationMetricSpecificationDefinition
from ._models import OperationServiceSpecificationDefinition
from ._models import OverrideTaskStepProperties
Expand Down Expand Up @@ -247,7 +248,6 @@
from ._models import SourceUpdateParameters
from ._models import SourceUploadDefinition
from ._models import Status
from ._models import StorageAccountProperties
from ._models import SystemData
from ._models import Target
from ._models import Task
Expand Down Expand Up @@ -310,6 +310,7 @@
TrustPolicyType,
EncryptionStatus,
PublicNetworkAccess,
NetworkRuleBypassOptions,
PasswordName,
RegistryUsageUnit,
WebhookStatus,
Expand Down Expand Up @@ -384,6 +385,7 @@
'NetworkRuleSet',
'OperationDefinition',
'OperationDisplayDefinition',
'OperationLogSpecificationDefinition',
'OperationMetricSpecificationDefinition',
'OperationServiceSpecificationDefinition',
'OverrideTaskStepProperties',
Expand Down Expand Up @@ -439,7 +441,6 @@
'SourceUpdateParameters',
'SourceUploadDefinition',
'Status',
'StorageAccountProperties',
'SystemData',
'Target',
'Task',
Expand Down Expand Up @@ -501,6 +502,7 @@
'TrustPolicyType',
'EncryptionStatus',
'PublicNetworkAccess',
'NetworkRuleBypassOptions',
'PasswordName',
'RegistryUsageUnit',
'WebhookStatus',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ class PublicNetworkAccess(str, Enum):
disabled = "Disabled"


class NetworkRuleBypassOptions(str, Enum):

azure_services = "AzureServices"
none = "None"


class PasswordName(str, Enum):

password = "password"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2231,6 +2231,30 @@ def __init__(self, **kwargs):
self.description = kwargs.get('description', None)


class OperationLogSpecificationDefinition(Model):
"""The definition of Azure Monitoring log.
:param name: Log name.
:type name: str
:param display_name: Log display name.
:type display_name: str
:param blob_duration: Log blob duration.
:type blob_duration: str
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'display_name': {'key': 'displayName', 'type': 'str'},
'blob_duration': {'key': 'blobDuration', 'type': 'str'},
}

def __init__(self, **kwargs):
super(OperationLogSpecificationDefinition, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.display_name = kwargs.get('display_name', None)
self.blob_duration = kwargs.get('blob_duration', None)


class OperationMetricSpecificationDefinition(Model):
"""The definition of Azure Monitoring metric.
Expand Down Expand Up @@ -2274,15 +2298,20 @@ class OperationServiceSpecificationDefinition(Model):
definition.
:type metric_specifications:
list[~azure.mgmt.containerregistry.v2019_12_01_preview.models.OperationMetricSpecificationDefinition]
:param log_specifications: A list of Azure Monitoring log definitions.
:type log_specifications:
list[~azure.mgmt.containerregistry.v2019_12_01_preview.models.OperationLogSpecificationDefinition]
"""

_attribute_map = {
'metric_specifications': {'key': 'metricSpecifications', 'type': '[OperationMetricSpecificationDefinition]'},
'log_specifications': {'key': 'logSpecifications', 'type': '[OperationLogSpecificationDefinition]'},
}

def __init__(self, **kwargs):
super(OperationServiceSpecificationDefinition, self).__init__(**kwargs)
self.metric_specifications = kwargs.get('metric_specifications', None)
self.log_specifications = kwargs.get('log_specifications', None)


class OverrideTaskStepProperties(Model):
Expand Down Expand Up @@ -2951,10 +2980,6 @@ class Registry(Resource):
:param admin_user_enabled: The value that indicates whether the admin user
is enabled. Default value: False .
:type admin_user_enabled: bool
:param storage_account: The properties of the storage account for the
container registry. Only applicable to Classic SKU.
:type storage_account:
~azure.mgmt.containerregistry.v2019_12_01_preview.models.StorageAccountProperties
:param network_rule_set: The network rule set for a container registry.
:type network_rule_set:
~azure.mgmt.containerregistry.v2019_12_01_preview.models.NetworkRuleSet
Expand All @@ -2979,6 +3004,11 @@ class Registry(Resource):
'Disabled'. Default value: "Enabled" .
:type public_network_access: str or
~azure.mgmt.containerregistry.v2019_12_01_preview.models.PublicNetworkAccess
:param network_rule_bypass_options: Whether to allow trusted Azure
services to access a network restricted registry. Possible values include:
'AzureServices', 'None'. Default value: "AzureServices" .
:type network_rule_bypass_options: str or
~azure.mgmt.containerregistry.v2019_12_01_preview.models.NetworkRuleBypassOptions
"""

_validation = {
Expand Down Expand Up @@ -3010,14 +3040,14 @@ class Registry(Resource):
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'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'},
'policies': {'key': 'properties.policies', 'type': 'Policies'},
'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperty'},
'data_endpoint_enabled': {'key': 'properties.dataEndpointEnabled', 'type': 'bool'},
'data_endpoint_host_names': {'key': 'properties.dataEndpointHostNames', 'type': '[str]'},
'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'},
'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'},
'network_rule_bypass_options': {'key': 'properties.networkRuleBypassOptions', 'type': 'str'},
}

def __init__(self, **kwargs):
Expand All @@ -3029,14 +3059,14 @@ def __init__(self, **kwargs):
self.provisioning_state = None
self.status = None
self.admin_user_enabled = kwargs.get('admin_user_enabled', False)
self.storage_account = kwargs.get('storage_account', None)
self.network_rule_set = kwargs.get('network_rule_set', None)
self.policies = kwargs.get('policies', None)
self.encryption = kwargs.get('encryption', None)
self.data_endpoint_enabled = kwargs.get('data_endpoint_enabled', None)
self.data_endpoint_host_names = None
self.private_endpoint_connections = None
self.public_network_access = kwargs.get('public_network_access', "Enabled")
self.network_rule_bypass_options = kwargs.get('network_rule_bypass_options', "AzureServices")


class RegistryListCredentialsResult(Model):
Expand Down Expand Up @@ -3145,13 +3175,13 @@ def __init__(self, **kwargs):
class RegistryUpdateParameters(Model):
"""The parameters for updating a container registry.
:param identity: The identity of the container registry.
:type identity:
~azure.mgmt.containerregistry.v2019_12_01_preview.models.IdentityProperties
:param tags: The tags for the container registry.
:type tags: dict[str, str]
:param sku: The SKU of the container registry.
:type sku: ~azure.mgmt.containerregistry.v2019_12_01_preview.models.Sku
:param identity: The identity of the container registry.
:type identity:
~azure.mgmt.containerregistry.v2019_12_01_preview.models.IdentityProperties
:param admin_user_enabled: The value that indicates whether the admin user
is enabled.
:type admin_user_enabled: bool
Expand All @@ -3172,31 +3202,38 @@ class RegistryUpdateParameters(Model):
'Disabled'
:type public_network_access: str or
~azure.mgmt.containerregistry.v2019_12_01_preview.models.PublicNetworkAccess
:param network_rule_bypass_options: Whether to allow trusted Azure
services to access a network restricted registry. Possible values include:
'AzureServices', 'None'. Default value: "AzureServices" .
:type network_rule_bypass_options: str or
~azure.mgmt.containerregistry.v2019_12_01_preview.models.NetworkRuleBypassOptions
"""

_attribute_map = {
'identity': {'key': 'identity', 'type': 'IdentityProperties'},
'tags': {'key': 'tags', 'type': '{str}'},
'sku': {'key': 'sku', 'type': 'Sku'},
'identity': {'key': 'identity', 'type': 'IdentityProperties'},
'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'},
'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'},
'policies': {'key': 'properties.policies', 'type': 'Policies'},
'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperty'},
'data_endpoint_enabled': {'key': 'properties.dataEndpointEnabled', 'type': 'bool'},
'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'},
'network_rule_bypass_options': {'key': 'properties.networkRuleBypassOptions', 'type': 'str'},
}

def __init__(self, **kwargs):
super(RegistryUpdateParameters, self).__init__(**kwargs)
self.identity = kwargs.get('identity', None)
self.tags = kwargs.get('tags', None)
self.sku = kwargs.get('sku', None)
self.identity = kwargs.get('identity', None)
self.admin_user_enabled = kwargs.get('admin_user_enabled', None)
self.network_rule_set = kwargs.get('network_rule_set', None)
self.policies = kwargs.get('policies', None)
self.encryption = kwargs.get('encryption', None)
self.data_endpoint_enabled = kwargs.get('data_endpoint_enabled', None)
self.public_network_access = kwargs.get('public_network_access', None)
self.network_rule_bypass_options = kwargs.get('network_rule_bypass_options', "AzureServices")


class RegistryUsage(Model):
Expand Down Expand Up @@ -4133,29 +4170,6 @@ def __init__(self, **kwargs):
self.timestamp = None


class StorageAccountProperties(Model):
"""The properties of a storage account for a container registry. Only
applicable to Classic SKU.
All required parameters must be populated in order to send to Azure.
:param id: Required. The resource ID of the storage account.
:type id: str
"""

_validation = {
'id': {'required': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
}

def __init__(self, **kwargs):
super(StorageAccountProperties, self).__init__(**kwargs)
self.id = kwargs.get('id', None)


class SystemData(Model):
"""Metadata pertaining to creation and last modification of the resource.
Expand Down
Loading

0 comments on commit 35fecac

Please sign in to comment.