diff --git a/src/azure-cli-core/azure/cli/core/profiles/_shared.py b/src/azure-cli-core/azure/cli/core/profiles/_shared.py index 95a4a88fac3..ed07f54e30e 100644 --- a/src/azure-cli-core/azure/cli/core/profiles/_shared.py +++ b/src/azure-cli-core/azure/cli/core/profiles/_shared.py @@ -194,7 +194,7 @@ def default_api_version(self): 'role_definitions': '2022-05-01-preview', 'provider_operations_metadata': '2018-01-01-preview' }), - ResourceType.MGMT_CONTAINERREGISTRY: SDKProfile('2023-11-01-preview', { + ResourceType.MGMT_CONTAINERREGISTRY: SDKProfile('2024-11-01-preview', { 'agent_pools': '2019-06-01-preview', 'tasks': '2019-06-01-preview', 'task_runs': '2019-06-01-preview', @@ -438,6 +438,7 @@ def default_api_version(self): 'VERSION_2021_08_01_PREVIEW': "2021-08-01-preview", 'VERSION_2022_02_01_PREVIEW': "2022-02-01-preview", 'VERSION_2023_11_01_PREVIEW': "2023-11-01-preview", + 'VERSION_2024_11_01_PREVIEW': "2024-11-01-preview", }, ResourceType.MGMT_CONTAINERSERVICE: { # src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_custom.py:50 diff --git a/src/azure-cli/azure/cli/command_modules/acr/_params.py b/src/azure-cli/azure/cli/command_modules/acr/_params.py index 7829050851f..ac018b2b8c7 100644 --- a/src/azure-cli/azure/cli/command_modules/acr/_params.py +++ b/src/azure-cli/azure/cli/command_modules/acr/_params.py @@ -73,9 +73,9 @@ def load_arguments(self, _): # pylint: disable=too-many-statements PasswordName, DefaultAction, PolicyStatus, WebhookAction, WebhookStatus, \ - TokenStatus, ZoneRedundancy = self.get_models( + TokenStatus, ZoneRedundancy, AutoGeneratedDomainNameLabelScope = self.get_models( 'PasswordName', 'DefaultAction', 'PolicyStatus', 'WebhookAction', 'WebhookStatus', - 'TokenStatus', 'ZoneRedundancy') + 'TokenStatus', 'ZoneRedundancy', 'AutoGeneratedDomainNameLabelScope') TaskStatus, BaseImageTriggerType, SourceRegistryLoginMode, UpdateTriggerPayloadType = self.get_models( 'TaskStatus', 'BaseImageTriggerType', 'SourceRegistryLoginMode', 'UpdateTriggerPayloadType', operation_group='tasks') RunStatus = self.get_models('RunStatus', operation_group='runs') @@ -121,6 +121,9 @@ def load_arguments(self, _): # pylint: disable=too-many-statements with self.argument_context('acr create') as c: c.argument('allow_metadata_search', arg_type=get_three_state_flag(), is_preview=True, help="Enable or disable the metadata-search feature for the registry. If not specified, this is set to disabled by default.") + with self.argument_context('acr create') as c: + c.argument('dnl_scope', options_list=['--dnlscope'], help='Domain name label scope will add a hash to the end of a login server name. The resulting login server name will be in the format -.azurecr-io. Default is Unsecure.', is_preview=True, arg_type=get_enum_type(AutoGeneratedDomainNameLabelScope)) + with self.argument_context('acr update', arg_group='Network Rule') as c: c.argument('data_endpoint_enabled', get_three_state_flag(), help="Enable dedicated data endpoint for client firewall configuration") @@ -269,6 +272,7 @@ def load_arguments(self, _): # pylint: disable=too-many-statements with self.argument_context('acr check-name') as c: c.argument('registry_name', completer=None, validator=None) + c.argument('dnl_scope', options_list=['--dnlscope'], help='Domain name label scope will add a hash to the end of a login server name. The resulting login server name will be in the format -.azurecr-io. Default is Unsecure.', is_preview=True, arg_type=get_enum_type(AutoGeneratedDomainNameLabelScope)) with self.argument_context('acr webhook') as c: c.argument('registry_name', options_list=['--registry', '-r']) diff --git a/src/azure-cli/azure/cli/command_modules/acr/custom.py b/src/azure-cli/azure/cli/command_modules/acr/custom.py index 1371f43dbb2..5e64d30c3a1 100644 --- a/src/azure-cli/azure/cli/command_modules/acr/custom.py +++ b/src/azure-cli/azure/cli/command_modules/acr/custom.py @@ -26,13 +26,24 @@ DEF_DIAG_SETTINGS_NAME_TEMPLATE = '{}-diagnostic-settings' SYSTEM_ASSIGNED_IDENTITY_ALIAS = '[system]' DENY_ACTION = 'Deny' - - -def acr_check_name(client, registry_name): - registry = { - 'name': registry_name, - 'type': 'Microsoft.ContainerRegistry/registries' - } +DOMAIN_NAME_LABEL_SCOPE_UNSECURE = 'Unsecure' +DOMAIN_NAME_LABEL_SCOPE_RESOURCE_GROUP_REUSE = 'ResourceGroupReuse' + + +def acr_check_name(cmd, client, registry_name, resource_group_name=None, dnl_scope=DOMAIN_NAME_LABEL_SCOPE_UNSECURE): + if dnl_scope.lower() == DOMAIN_NAME_LABEL_SCOPE_RESOURCE_GROUP_REUSE.lower() and resource_group_name is None: + raise CLIError("Resource group name is required for domain name label scope " + + DOMAIN_NAME_LABEL_SCOPE_RESOURCE_GROUP_REUSE) + if _get_domain_name_label_scope(cmd, dnl_scope): + registry = { + 'name': registry_name, + 'type': 'Microsoft.ContainerRegistry/registries', + 'resourceGroupName': resource_group_name, + "autoGeneratedDomainNameLabelScope": _get_domain_name_label_scope(cmd, dnl_scope) + } + else: + raise CLIError("Invalid domain name label scope. The allowed values are 'Unsecure', 'TenantReuse'," + + "'SubscriptionReuse', 'ResourceGroupReuse' or 'NoReuse'.") return client.check_name_availability(registry) @@ -58,7 +69,8 @@ def acr_create(cmd, allow_trusted_services=None, allow_exports=None, tags=None, - allow_metadata_search=None): + allow_metadata_search=None, + dnl_scope=None): if default_action and sku not in get_premium_sku(cmd): raise CLIError(NETWORK_RULE_NOT_SUPPORTED) @@ -87,6 +99,9 @@ def acr_create(cmd, if allow_metadata_search is not None: _configure_metadata_search(cmd, registry, allow_metadata_search) + if dnl_scope is not None: + _configure_domain_name_label_scope(cmd, registry, dnl_scope) + _handle_network_bypass(cmd, registry, allow_trusted_services) _handle_export_policy(cmd, registry, allow_exports) @@ -630,3 +645,12 @@ def list_private_link_resources(cmd, client, registry_name, resource_group_name= def _configure_metadata_search(cmd, registry, enabled): MetadataSearch = cmd.get_models('MetadataSearch') registry.metadata_search = (MetadataSearch.enabled if enabled else MetadataSearch.disabled) + + +def _configure_domain_name_label_scope(cmd, registry, scope): + registry.auto_generated_domain_name_label_scope = _get_domain_name_label_scope(cmd, scope) + + +def _get_domain_name_label_scope(cmd, scope): + DomainNameLabelScope = cmd.get_models('AutoGeneratedDomainNameLabelScope') + return DomainNameLabelScope(scope).value diff --git a/src/azure-cli/azure/cli/command_modules/acr/tests/.vscode/settings.json b/src/azure-cli/azure/cli/command_modules/acr/tests/.vscode/settings.json new file mode 100644 index 00000000000..e065b89e8e9 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/acr/tests/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "python.testing.unittestArgs": [ + "-v", + "-s", + ".", + "-p", + "test*.py" + ], + "python.testing.pytestEnabled": false, + "python.testing.unittestEnabled": true +} \ No newline at end of file diff --git a/src/azure-cli/azure/cli/command_modules/acr/tests/latest/recordings/test_acr_create_with_domain_name_label_scope_tenant_reuse.yaml b/src/azure-cli/azure/cli/command_modules/acr/tests/latest/recordings/test_acr_create_with_domain_name_label_scope_tenant_reuse.yaml new file mode 100644 index 00000000000..379bfa60efb --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/acr/tests/latest/recordings/test_acr_create_with_domain_name_label_scope_tenant_reuse.yaml @@ -0,0 +1,516 @@ +interactions: +- request: + body: '{"location": "westus", "sku": {"name": "Premium"}, "properties": {"adminUserEnabled": + false, "anonymousPullEnabled": false, "autoGeneratedDomainNameLabelScope": "TenantReuse"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - acr create + Connection: + - keep-alive + Content-Length: + - '176' + Content-Type: + - application/json + ParameterSetName: + - -n -g -l --sku --dnlscope + User-Agent: + - AZURECLI/2.67.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002?api-version=2024-11-01-preview + response: + body: + string: '{"sku":{"name":"Premium","tier":"Premium"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","location":"westus","tags":{},"systemData":{"createdBy":"trisavo@acr.ccsctp.net","createdByType":"User","createdAt":"2025-01-07T18:09:38.2237257+00:00","lastModifiedBy":"trisavo@acr.ccsctp.net","lastModifiedByType":"User","lastModifiedAt":"2025-01-07T18:09:38.2237257+00:00"},"properties":{"loginServer":"clireg000002-gcgnbeakd2c6f4cv.azurecr-test.io","creationDate":"2025-01-07T18:09:38.2237257Z","provisioningState":"Creating","adminUserEnabled":false,"networkRuleSet":{"defaultAction":"Allow","ipRules":[]},"policies":{"quarantinePolicy":{"status":"disabled"},"trustPolicy":{"type":"Notary","status":"disabled"},"retentionPolicy":{"days":7,"lastUpdatedTime":"2025-01-07T18:09:45.6094143+00:00","status":"disabled"},"exportPolicy":{"status":"enabled"},"azureADAuthenticationAsArmPolicy":{"status":"enabled"},"softDeletePolicy":{"retentionDays":7,"lastUpdatedTime":"2025-01-07T18:09:45.6094603+00:00","status":"disabled"}},"encryption":{"status":"disabled"},"dataEndpointEnabled":false,"dataEndpointHostNames":[],"privateEndpointConnections":[],"publicNetworkAccess":"Enabled","networkRuleBypassOptions":"AzureServices","zoneRedundancy":"Disabled","anonymousPullEnabled":false,"metadataSearch":"Disabled","autoGeneratedDomainNameLabelScope":"TenantReuse"}}' + headers: + api-supported-versions: + - 2024-11-01-preview + azure-asyncoperation: + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/operationStatuses/registries-8e09b8fd-cd22-11ef-90da-002248c12be1?api-version=2024-11-01-preview&t=638718701857865096&c=MIIHmjCCBoKgAwIBAgITOgO7-ADjsR0jxit6FwAEA7v4ADANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwOTI3MDgzODQwWhcNMjUwMzI2MDgzODQwWjA1MTMwM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PBoC4ZkhZHVup_7oxC9I86ns3lQE-Hix6WkR5d9f1R_ytg2Dp7qBH5ZqH3-HBMzqDhFamirGL7cRGPGlm6TdFo5mK5o-3wR_gqjLFJQ08T7HVbuV329KQ9nWHU5OJQ1es2oUJnmri7wt-4GPqyshQt3IpblixNpaVBKNK_jvul62gBribStQ63jyBPACMDvmmwm9FvSRKROi6wDPA2-9Fv6zWiRN3etC99G4MlbpLn3IUu7396nP_4Q&s=scpC7UUYcb6J8ILPMRS3AcV8vgnwKcNQxKNnpZ4PAWLcCD-Z6zqn9jLRnXJzLaGJV7Czj8w5l35T2r10aXnbKDrfbUdEtEn2IkMAcP287aU0TaxXdWLJ4H1PwKL2aZOG7_V3bcPhBaOhDLHAz5EZsX5QI7voJYkUwN8fGV9tnLrRcf20Ga79DSD2ghUfZ8CUuCs952WYL1FjYMUi5_PnIHBy1irrslgmG7_RNQnjevCRnswScgBYCgS6KJ5a84_53JUzT78liXTIqTRGF9jB2GW-nKYJaxKF7caWlVFzaH0Ky6aukAUFBvcOXuJ9VTz7EMnYHPyjFTSFQ3mE24m87Q&h=C5lNBUHyI0G7222cMQOhKbWiHr2a5eTxLnX7fauuRbQ + cache-control: + - no-cache + content-length: + - '1523' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 07 Jan 2025 18:09:45 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=4d92a8d2-0704-4164-b302-21b2db317dc5,objectId=210a5c45-4fca-4299-9f17-8e50f8eeb3f2/centralus/3c6573e6-c48c-4d43-ab55-bee3664ba2ef + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: 24FB13C9B1FA45FEA09741BB3A7BCBAA Ref B: CO6AA3150217029 Ref C: 2025-01-07T18:09:37Z' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - acr create + Connection: + - keep-alive + ParameterSetName: + - -n -g -l --sku --dnlscope + User-Agent: + - AZURECLI/2.67.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/operationStatuses/registries-8e09b8fd-cd22-11ef-90da-002248c12be1?api-version=2024-11-01-preview&t=638718701857865096&c=MIIHmjCCBoKgAwIBAgITOgO7-ADjsR0jxit6FwAEA7v4ADANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwOTI3MDgzODQwWhcNMjUwMzI2MDgzODQwWjA1MTMwMQYDVQQDEyphc3luY29wZXJhdGlvbnNpZ25pbmcubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDR8Pt-7BIYw-n71cuPDELxOMJ5MdjXZ1jQlPb7dnbTTwYH2UQd7R1uQVu9_ljteV58I9yOxfEbZAJb_Lr8sAsprBoGoA6Pq2C_lVnteHHVoUOGMIb2DsFchGlr9O0EECJ3w9GUNBV6ii77GerZMFtsIJMyKbujOEIBmBD9KX1i0A12PNn5Q_MCak7BlHfpFl0-9bDM2LgZgPxzq7AkN7788n95cOIO4x5IMNnH0DmqWdt15btKMxCD9dv4vLZ3J_WQqT0Sop2PW-cbL8M6ATPgVulQe-jrMmBUazFEZ46GgjamHce1BW7E0nQYgobnY1TB-SPn-bkPZEZWZ45sfywlAgMBAAGjggSSMIIEjjAnBgkrBgEEAYI3FQoEGjAYMAoGCCsGAQUFBwMBMAoGCCsGAQUFBwMCMD0GCSsGAQQB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KF7caWlVFzaH0Ky6aukAUFBvcOXuJ9VTz7EMnYHPyjFTSFQ3mE24m87Q&h=C5lNBUHyI0G7222cMQOhKbWiHr2a5eTxLnX7fauuRbQ + response: + body: + string: '{"status":"Succeeded"}' + headers: + api-supported-versions: + - 2024-11-01-preview + azure-asyncoperation: + - https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/operationStatuses/registries-8e09b8fd-cd22-11ef-90da-002248c12be1?api-version=2024-11-01-preview&t=638718701862877001&c=MIIHmjCCBoKgAwIBAgITOgO7-ADjsR0jxit6FwAEA7v4ADANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSU5GUkEgQ0EgMDEwHhcNMjQwOTI3MDgzODQwWhcNMjUwMzI2MDgzODQwWjA1MTMwMQYDVQQDEyphc3luY29wZXJhdGlvbnNpZ25pbmcubWFuYWdlbWVudC5henVyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDR8Pt-7BIYw-n71cuPDELxOMJ5MdjXZ1jQlPb7dnbTTwYH2UQd7R1uQVu9_ljteV58I9yOxfEbZAJb_Lr8sAsprBoGoA6Pq2C_lVnteHHVoUOGMIb2DsFchGlr9O0EECJ3w9GUNBV6ii77GerZMFtsIJMyKbujOEIBmBD9KX1i0A12PNn5Q_MCak7BlHfpFl0-9bDM2LgZgPxzq7AkN7788n95cOIO4x5IMNnH0DmqWdt15btKMxCD9dv4vLZ3J_WQqT0Sop2PW-cbL8M6ATPgVulQe-jrMmBUazFEZ46GgjamHce1BW7E0nQYgobnY1TB-SPn-bkPZEZWZ45sfywlAgMBAAGjggSSMIIEjjAnBgkrBgEEAYI3FQoEGjAYMAoGCCsGAQUFBwMBMAoGCCsGAQUFBwMCMD0GCSsGAQQBgjcVBw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n2QZkUus_c58_1MdLd1CxEsWnc5PsfmGgbE2AOW_L-AZTdflqc3Q&h=HE6KITmNv0_kEteYxErJVzUFr6Ut2cpAMMlnsjriLe0 + cache-control: + - no-cache + content-length: + - '22' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 07 Jan 2025 18:09:45 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=4d92a8d2-0704-4164-b302-21b2db317dc5,objectId=210a5c45-4fca-4299-9f17-8e50f8eeb3f2/centralus/e86d5e3f-2e92-44e8-a378-7f16c3502ba1 + x-ms-ratelimit-remaining-subscription-global-reads: + - '3748' + x-msedge-ref: + - 'Ref A: E0919C324A3048079872A52AA507D317 Ref B: CO6AA3150217029 Ref C: 2025-01-07T18:09:46Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - acr create + Connection: + - keep-alive + ParameterSetName: + - -n -g -l --sku --dnlscope + User-Agent: + - AZURECLI/2.67.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002?api-version=2024-11-01-preview + response: + body: + string: '{"sku":{"name":"Premium","tier":"Premium"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","location":"westus","tags":{},"systemData":{"createdBy":"trisavo@acr.ccsctp.net","createdByType":"User","createdAt":"2025-01-07T18:09:38.2237257+00:00","lastModifiedBy":"trisavo@acr.ccsctp.net","lastModifiedByType":"User","lastModifiedAt":"2025-01-07T18:09:38.2237257+00:00"},"properties":{"loginServer":"clireg000002-gcgnbeakd2c6f4cv.azurecr-test.io","creationDate":"2025-01-07T18:09:38.2237257Z","provisioningState":"Succeeded","adminUserEnabled":false,"networkRuleSet":{"defaultAction":"Allow","ipRules":[]},"policies":{"quarantinePolicy":{"status":"disabled"},"trustPolicy":{"type":"Notary","status":"disabled"},"retentionPolicy":{"days":7,"lastUpdatedTime":"2025-01-07T18:09:45.6094143+00:00","status":"disabled"},"exportPolicy":{"status":"enabled"},"azureADAuthenticationAsArmPolicy":{"status":"enabled"},"softDeletePolicy":{"retentionDays":7,"lastUpdatedTime":"2025-01-07T18:09:45.6094603+00:00","status":"disabled"}},"encryption":{"status":"disabled"},"dataEndpointEnabled":false,"dataEndpointHostNames":[],"privateEndpointConnections":[],"publicNetworkAccess":"Enabled","networkRuleBypassOptions":"AzureServices","zoneRedundancy":"Disabled","anonymousPullEnabled":false,"metadataSearch":"Disabled","autoGeneratedDomainNameLabelScope":"TenantReuse"}}' + headers: + api-supported-versions: + - 2024-11-01-preview + cache-control: + - no-cache + content-length: + - '1524' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 07 Jan 2025 18:09:46 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3743' + x-msedge-ref: + - 'Ref A: 5F7EFDCB0F5D4B0BB966D325D14FA46D Ref B: CO6AA3150217029 Ref C: 2025-01-07T18:09:46Z' + status: + code: 200 + message: OK +- request: + body: '{"name": "clireg000002", "type": "Microsoft.ContainerRegistry/registries", + "autoGeneratedDomainNameLabelScope": "Unsecure"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - acr check-name + Connection: + - keep-alive + Content-Length: + - '123' + Content-Type: + - application/json + ParameterSetName: + - -n + User-Agent: + - AZURECLI/2.67.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: POST + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/checkNameAvailability?api-version=2024-11-01-preview + response: + body: + string: '{"nameAvailable":false,"reason":"AlreadyExists","message":"The registry + clireg000002 is already in use."}' + headers: + cache-control: + - no-cache + content-length: + - '105' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 07 Jan 2025 18:09:47 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=4d92a8d2-0704-4164-b302-21b2db317dc5,objectId=210a5c45-4fca-4299-9f17-8e50f8eeb3f2/centralus/093bc3da-95db-4898-9096-6110fe331cb7 + x-ms-ratelimit-remaining-subscription-global-reads: + - '3748' + x-msedge-ref: + - 'Ref A: 4CC05A5034C64E20B1DFC387327603DB Ref B: CO6AA3150218017 Ref C: 2025-01-07T18:09:47Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - acr list + Connection: + - keep-alive + ParameterSetName: + - -g + User-Agent: + - AZURECLI/2.67.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries?api-version=2024-11-01-preview + response: + body: + string: '{"value":[{"sku":{"name":"Premium","tier":"Premium"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","location":"westus","tags":{},"systemData":{"createdBy":"trisavo@acr.ccsctp.net","createdByType":"User","createdAt":"2025-01-07T18:09:38.2237257+00:00","lastModifiedBy":"trisavo@acr.ccsctp.net","lastModifiedByType":"User","lastModifiedAt":"2025-01-07T18:09:38.2237257+00:00"},"properties":{"loginServer":"clireg000002-gcgnbeakd2c6f4cv.azurecr-test.io","creationDate":"2025-01-07T18:09:38.2237257Z","provisioningState":"Succeeded","adminUserEnabled":false,"networkRuleSet":{"defaultAction":"Allow","ipRules":[]},"policies":{"quarantinePolicy":{"status":"disabled"},"trustPolicy":{"type":"Notary","status":"disabled"},"retentionPolicy":{"days":7,"lastUpdatedTime":"2025-01-07T18:09:45.6094143+00:00","status":"disabled"},"exportPolicy":{"status":"enabled"},"azureADAuthenticationAsArmPolicy":{"status":"enabled"},"softDeletePolicy":{"retentionDays":7,"lastUpdatedTime":"2025-01-07T18:09:45.6094603+00:00","status":"disabled"}},"encryption":{"status":"disabled"},"dataEndpointEnabled":false,"dataEndpointHostNames":[],"privateEndpointConnections":[],"publicNetworkAccess":"Enabled","networkRuleBypassOptions":"AzureServices","zoneRedundancy":"Disabled","anonymousPullEnabled":false,"metadataSearch":"Disabled","autoGeneratedDomainNameLabelScope":"TenantReuse"}}]}' + headers: + api-supported-versions: + - 2024-11-01-preview + cache-control: + - no-cache + content-length: + - '1536' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 07 Jan 2025 18:09:48 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - '' + x-ms-ratelimit-remaining-subscription-global-reads: + - '3747' + x-msedge-ref: + - 'Ref A: 9104081A97A647EEA1C1DA7275E82D68 Ref B: CO6AA3150217031 Ref C: 2025-01-07T18:09:48Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - acr show + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.67.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002?api-version=2024-11-01-preview + response: + body: + string: '{"sku":{"name":"Premium","tier":"Premium"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","location":"westus","tags":{},"systemData":{"createdBy":"trisavo@acr.ccsctp.net","createdByType":"User","createdAt":"2025-01-07T18:09:38.2237257+00:00","lastModifiedBy":"trisavo@acr.ccsctp.net","lastModifiedByType":"User","lastModifiedAt":"2025-01-07T18:09:38.2237257+00:00"},"properties":{"loginServer":"clireg000002-gcgnbeakd2c6f4cv.azurecr-test.io","creationDate":"2025-01-07T18:09:38.2237257Z","provisioningState":"Succeeded","adminUserEnabled":false,"networkRuleSet":{"defaultAction":"Allow","ipRules":[]},"policies":{"quarantinePolicy":{"status":"disabled"},"trustPolicy":{"type":"Notary","status":"disabled"},"retentionPolicy":{"days":7,"lastUpdatedTime":"2025-01-07T18:09:45.6094143+00:00","status":"disabled"},"exportPolicy":{"status":"enabled"},"azureADAuthenticationAsArmPolicy":{"status":"enabled"},"softDeletePolicy":{"retentionDays":7,"lastUpdatedTime":"2025-01-07T18:09:45.6094603+00:00","status":"disabled"}},"encryption":{"status":"disabled"},"dataEndpointEnabled":false,"dataEndpointHostNames":[],"privateEndpointConnections":[],"publicNetworkAccess":"Enabled","networkRuleBypassOptions":"AzureServices","zoneRedundancy":"Disabled","anonymousPullEnabled":false,"metadataSearch":"Disabled","autoGeneratedDomainNameLabelScope":"TenantReuse"}}' + headers: + api-supported-versions: + - 2024-11-01-preview + cache-control: + - no-cache + content-length: + - '1524' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 07 Jan 2025 18:09:49 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: 68C244732E074A95AC21B4E52291A80F Ref B: CO6AA3150217037 Ref C: 2025-01-07T18:09:49Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - acr show-usage + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.67.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002?api-version=2024-11-01-preview + response: + body: + string: '{"sku":{"name":"Premium","tier":"Premium"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","location":"westus","tags":{},"systemData":{"createdBy":"trisavo@acr.ccsctp.net","createdByType":"User","createdAt":"2025-01-07T18:09:38.2237257+00:00","lastModifiedBy":"trisavo@acr.ccsctp.net","lastModifiedByType":"User","lastModifiedAt":"2025-01-07T18:09:38.2237257+00:00"},"properties":{"loginServer":"clireg000002-gcgnbeakd2c6f4cv.azurecr-test.io","creationDate":"2025-01-07T18:09:38.2237257Z","provisioningState":"Succeeded","adminUserEnabled":false,"networkRuleSet":{"defaultAction":"Allow","ipRules":[]},"policies":{"quarantinePolicy":{"status":"disabled"},"trustPolicy":{"type":"Notary","status":"disabled"},"retentionPolicy":{"days":7,"lastUpdatedTime":"2025-01-07T18:09:45.6094143+00:00","status":"disabled"},"exportPolicy":{"status":"enabled"},"azureADAuthenticationAsArmPolicy":{"status":"enabled"},"softDeletePolicy":{"retentionDays":7,"lastUpdatedTime":"2025-01-07T18:09:45.6094603+00:00","status":"disabled"}},"encryption":{"status":"disabled"},"dataEndpointEnabled":false,"dataEndpointHostNames":[],"privateEndpointConnections":[],"publicNetworkAccess":"Enabled","networkRuleBypassOptions":"AzureServices","zoneRedundancy":"Disabled","anonymousPullEnabled":false,"metadataSearch":"Disabled","autoGeneratedDomainNameLabelScope":"TenantReuse"}}' + headers: + api-supported-versions: + - 2024-11-01-preview + cache-control: + - no-cache + content-length: + - '1524' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 07 Jan 2025 18:09:49 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3747' + x-msedge-ref: + - 'Ref A: CFA276421A9448AD8279FF990DB7729F Ref B: CO6AA3150217039 Ref C: 2025-01-07T18:09:49Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - acr show-usage + Connection: + - keep-alive + ParameterSetName: + - -n -g + User-Agent: + - AZURECLI/2.67.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002/listUsages?api-version=2024-11-01-preview + response: + body: + string: '{"value":[{"name":"Size","limit":536870912000,"currentValue":0,"unit":"Bytes"},{"name":"Webhooks","limit":500,"currentValue":0,"unit":"Count"},{"name":"Geo-replications","limit":-1,"currentValue":0,"unit":"Count"},{"name":"IPRules","limit":100,"currentValue":0,"unit":"Count"},{"name":"VNetRules","limit":100,"currentValue":0,"unit":"Count"},{"name":"PrivateEndpointConnections","limit":200,"currentValue":0,"unit":"Count"},{"name":"ScopeMaps","limit":50000,"currentValue":0,"unit":"Count"},{"name":"Tokens","limit":50000,"currentValue":0,"unit":"Count"}]}' + headers: + api-supported-versions: + - 2024-11-01-preview + cache-control: + - no-cache + content-length: + - '556' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 07 Jan 2025 18:09:49 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=4d92a8d2-0704-4164-b302-21b2db317dc5,objectId=210a5c45-4fca-4299-9f17-8e50f8eeb3f2/centralus/841cb17a-e67b-4cb9-b5c0-3848613dff4f + x-ms-ratelimit-remaining-subscription-global-reads: + - '3746' + x-msedge-ref: + - 'Ref A: F717FBA4492146F68103B235CF854F39 Ref B: CO6AA3150218047 Ref C: 2025-01-07T18:09:49Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - acr update + Connection: + - keep-alive + ParameterSetName: + - -n -g --tags --admin-enabled + User-Agent: + - AZURECLI/2.67.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002?api-version=2024-11-01-preview + response: + body: + string: '{"sku":{"name":"Premium","tier":"Premium"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","location":"westus","tags":{},"systemData":{"createdBy":"trisavo@acr.ccsctp.net","createdByType":"User","createdAt":"2025-01-07T18:09:38.2237257+00:00","lastModifiedBy":"trisavo@acr.ccsctp.net","lastModifiedByType":"User","lastModifiedAt":"2025-01-07T18:09:38.2237257+00:00"},"properties":{"loginServer":"clireg000002-gcgnbeakd2c6f4cv.azurecr-test.io","creationDate":"2025-01-07T18:09:38.2237257Z","provisioningState":"Succeeded","adminUserEnabled":false,"networkRuleSet":{"defaultAction":"Allow","ipRules":[]},"policies":{"quarantinePolicy":{"status":"disabled"},"trustPolicy":{"type":"Notary","status":"disabled"},"retentionPolicy":{"days":7,"lastUpdatedTime":"2025-01-07T18:09:45.6094143+00:00","status":"disabled"},"exportPolicy":{"status":"enabled"},"azureADAuthenticationAsArmPolicy":{"status":"enabled"},"softDeletePolicy":{"retentionDays":7,"lastUpdatedTime":"2025-01-07T18:09:45.6094603+00:00","status":"disabled"}},"encryption":{"status":"disabled"},"dataEndpointEnabled":false,"dataEndpointHostNames":[],"privateEndpointConnections":[],"publicNetworkAccess":"Enabled","networkRuleBypassOptions":"AzureServices","zoneRedundancy":"Disabled","anonymousPullEnabled":false,"metadataSearch":"Disabled","autoGeneratedDomainNameLabelScope":"TenantReuse"}}' + headers: + api-supported-versions: + - 2024-11-01-preview + cache-control: + - no-cache + content-length: + - '1524' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 07 Jan 2025 18:09:50 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3747' + x-msedge-ref: + - 'Ref A: CFD475EC55174079BFE15A51976347C4 Ref B: CO6AA3150220053 Ref C: 2025-01-07T18:09:50Z' + status: + code: 200 + message: OK +- request: + body: '{"tags": {"foo": "bar", "cat": ""}, "properties": {"adminUserEnabled": + true}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - acr update + Connection: + - keep-alive + Content-Length: + - '77' + Content-Type: + - application/json + ParameterSetName: + - -n -g --tags --admin-enabled + User-Agent: + - AZURECLI/2.67.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: PATCH + uri: https://api-dogfood.resources.windows-int.net/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002?api-version=2024-11-01-preview + response: + body: + string: '{"sku":{"name":"Premium","tier":"Premium"},"type":"Microsoft.ContainerRegistry/registries","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerRegistry/registries/clireg000002","name":"clireg000002","location":"westus","tags":{"foo":"bar","cat":""},"systemData":{"createdBy":"trisavo@acr.ccsctp.net","createdByType":"User","createdAt":"2025-01-07T18:09:38.2237257+00:00","lastModifiedBy":"trisavo@acr.ccsctp.net","lastModifiedByType":"User","lastModifiedAt":"2025-01-07T18:09:51.8807444+00:00"},"properties":{"loginServer":"clireg000002-gcgnbeakd2c6f4cv.azurecr-test.io","creationDate":"2025-01-07T18:09:38.2237257Z","provisioningState":"Succeeded","adminUserEnabled":true,"networkRuleSet":{"defaultAction":"Allow","ipRules":[]},"policies":{"quarantinePolicy":{"status":"disabled"},"trustPolicy":{"type":"Notary","status":"disabled"},"retentionPolicy":{"days":7,"lastUpdatedTime":"2025-01-07T18:09:45.6094143+00:00","status":"disabled"},"exportPolicy":{"status":"enabled"},"azureADAuthenticationAsArmPolicy":{"status":"enabled"},"softDeletePolicy":{"retentionDays":7,"lastUpdatedTime":"2025-01-07T18:09:45.6094603+00:00","status":"disabled"}},"encryption":{"status":"disabled"},"dataEndpointEnabled":false,"dataEndpointHostNames":[],"privateEndpointConnections":[],"publicNetworkAccess":"Enabled","networkRuleBypassOptions":"AzureServices","zoneRedundancy":"Disabled","anonymousPullEnabled":false,"metadataSearch":"Disabled","autoGeneratedDomainNameLabelScope":"TenantReuse"}}' + headers: + api-supported-versions: + - 2024-11-01-preview + cache-control: + - no-cache + content-length: + - '1543' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 07 Jan 2025 18:09:52 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=4d92a8d2-0704-4164-b302-21b2db317dc5,objectId=210a5c45-4fca-4299-9f17-8e50f8eeb3f2/centralus/e3883d3d-4a91-405e-badb-9a060a4ef3ee + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: C397CC98A3A74F82BCA8A6FE4107B079 Ref B: CO6AA3150219011 Ref C: 2025-01-07T18:09:51Z' + status: + code: 200 + message: OK +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands.py b/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands.py index 92a02a94555..18502bca9f5 100644 --- a/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands.py +++ b/src/azure-cli/azure/cli/command_modules/acr/tests/latest/test_acr_commands.py @@ -102,7 +102,19 @@ def test_check_name_availability(self): self.cmd('acr check-name -n {name}', checks=[ self.check('nameAvailable', True) ]) + + def test_check_name_availability_dnl_scope(self): + # the chance of this randomly generated name has a duplication is rare + name = self.create_random_name('clireg', 20) + self.kwargs.update({ + 'name': name + }) + self.cmd('acr check-name -n {name} --dnlscope noreuse', checks=[ + self.check('nameAvailable', True), + self.check_pattern('availableLoginServerName','{registry_name}-[a-zA-Z0-9]+\.*') + ]) + @ResourceGroupPreparer() def test_acr_create_with_managed_registry(self, resource_group, resource_group_location): registry_name = self.create_random_name('clireg', 20) @@ -881,3 +893,52 @@ def test_acr_create_with_metadata_search_disabled(self, resource_group, resource self.check('metadataSearch', 'Enabled')]) self._core_registry_scenario(registry_name, resource_group, resource_group_location) + + @ResourceGroupPreparer() + def test_acr_create_with_domain_name_label_scope_tenant_reuse(self, resource_group, resource_group_location): + registry_name = self.create_random_name('clireg', 20) + + self.kwargs.update({ + 'registry_name': registry_name, + 'rg_loc': resource_group_location, + 'sku': 'Premium' + }) + + self.cmd('acr create -n {registry_name} -g {rg} -l {rg_loc} --sku {sku} --dnlscope tenantreuse', + checks=[self.check('name', '{registry_name}'), + self.check_pattern('loginServer','{registry_name}-[a-zA-Z0-9]+\.*'), + self.check('location', '{rg_loc}'), + self.check('adminUserEnabled', False), + self.check('sku.name', 'Premium'), + self.check('sku.tier', 'Premium'), + self.check('provisioningState', 'Succeeded'), + self.check('autoGeneratedDomainNameLabelScope', 'TenantReuse')]) + + + self._core_registry_scenario(registry_name, resource_group, resource_group_location) + + @ResourceGroupPreparer() + @AllowLargeResponse + def test_acr_create_with_domain_name_label_scope_name_in_use(self, resource_group, resource_group_location): + registry_name = self.create_random_name('clireg', 20) + + self.kwargs.update({ + 'registry_name': registry_name, + 'rg_loc': resource_group_location, + 'rg2': 'randomresourcegroupname', + 'sku': 'Premium' + }) + + self.cmd('acr create -n {registry_name} -g {rg} -l {rg_loc} --sku {sku} --dnlscope resourcegroupreuse', + checks=[self.check('name', '{registry_name}'), + self.check_pattern('loginServer','{registry_name}-[a-zA-Z0-9]+\.*'), + self.check('location', '{rg_loc}'), + self.check('adminUserEnabled', False), + self.check('sku.name', 'Premium'), + self.check('sku.tier', 'Premium'), + self.check('provisioningState', 'Succeeded'), + self.check('autoGeneratedDomainNameLabelScope', 'ResourceGroupReuse')]) + + + with self.assertRaises(Exception) as ex: + self.cmd('acr create -n {registry_name} -g {rg2} -l {rg_loc} --sku {sku} --dnlscope resourcegroupreuse') diff --git a/src/azure-cli/requirements.py3.Darwin.txt b/src/azure-cli/requirements.py3.Darwin.txt index 5a593fc4324..c7e1e1714c6 100644 --- a/src/azure-cli/requirements.py3.Darwin.txt +++ b/src/azure-cli/requirements.py3.Darwin.txt @@ -30,7 +30,7 @@ azure-mgmt-cdn==12.0.0 azure-mgmt-cognitiveservices==13.5.0 azure-mgmt-compute==33.0.0 azure-mgmt-containerinstance==10.2.0b1 -azure-mgmt-containerregistry==10.3.0 +azure-mgmt-containerregistry==11.0.0 azure-mgmt-containerservice==33.0.0 azure-mgmt-core==1.3.2 azure-mgmt-cosmosdb==9.7.0 diff --git a/src/azure-cli/requirements.py3.Linux.txt b/src/azure-cli/requirements.py3.Linux.txt index afd364769e4..9cd95a1d711 100644 --- a/src/azure-cli/requirements.py3.Linux.txt +++ b/src/azure-cli/requirements.py3.Linux.txt @@ -30,7 +30,7 @@ azure-mgmt-cdn==12.0.0 azure-mgmt-cognitiveservices==13.5.0 azure-mgmt-compute==33.0.0 azure-mgmt-containerinstance==10.2.0b1 -azure-mgmt-containerregistry==10.3.0 +azure-mgmt-containerregistry==11.0.0 azure-mgmt-containerservice==33.0.0 azure-mgmt-core==1.3.2 azure-mgmt-cosmosdb==9.7.0 diff --git a/src/azure-cli/requirements.py3.windows.txt b/src/azure-cli/requirements.py3.windows.txt index 6ade9e11482..723155a658e 100644 --- a/src/azure-cli/requirements.py3.windows.txt +++ b/src/azure-cli/requirements.py3.windows.txt @@ -30,7 +30,7 @@ azure-mgmt-cdn==12.0.0 azure-mgmt-cognitiveservices==13.5.0 azure-mgmt-compute==33.0.0 azure-mgmt-containerinstance==10.2.0b1 -azure-mgmt-containerregistry==10.3.0 +azure-mgmt-containerregistry==11.0.0 azure-mgmt-containerservice==33.0.0 azure-mgmt-core==1.3.2 azure-mgmt-cosmosdb==9.7.0 diff --git a/src/azure-cli/setup.py b/src/azure-cli/setup.py index 13d34b97228..f87c83adc38 100644 --- a/src/azure-cli/setup.py +++ b/src/azure-cli/setup.py @@ -75,7 +75,7 @@ 'azure-mgmt-cognitiveservices~=13.5.0', 'azure-mgmt-compute~=33.0.0', 'azure-mgmt-containerinstance==10.2.0b1', - 'azure-mgmt-containerregistry==10.3.0', + 'azure-mgmt-containerregistry==11.0.0', 'azure-mgmt-containerservice~=33.0.0', 'azure-mgmt-cosmosdb==9.7.0', 'azure-mgmt-databoxedge~=1.0.0',