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
28 changes: 1 addition & 27 deletions src/azure-cli-core/azure/cli/core/cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,6 @@ class CloudNameEnum: # pylint: disable=too-few-public-methods
AzureCloud = 'AzureCloud'
AzureChinaCloud = 'AzureChinaCloud'
AzureUSGovernment = 'AzureUSGovernment'
AzureGermanCloud = 'AzureGermanCloud'
AzureBleuCloud = 'AzureBleuCloud'


Expand Down Expand Up @@ -465,31 +464,6 @@ class CloudNameEnum: # pylint: disable=too-few-public-methods
acr_login_server_endpoint='.azurecr.us',
synapse_analytics_endpoint='.dev.azuresynapse.usgovcloudapi.net'))

AZURE_GERMAN_CLOUD = Cloud(
CloudNameEnum.AzureGermanCloud,
endpoints=CloudEndpoints(
management='https://management.core.cloudapi.de/',
resource_manager='https://management.microsoftazure.de',
sql_management='https://management.core.cloudapi.de:8443/',
batch_resource_id='https://batch.cloudapi.de/',
gallery='https://gallery.cloudapi.de/',
active_directory='https://login.microsoftonline.de',
active_directory_resource_id='https://management.core.cloudapi.de/',
active_directory_graph_resource_id='https://graph.cloudapi.de/',
microsoft_graph_resource_id='https://graph.microsoft.de',
vm_image_alias_doc='https://azcliprod.blob.core.windows.net/cli/vm/aliases.json',
media_resource_id='https://rest.media.cloudapi.de',
ossrdbms_resource_id='https://ossrdbms-aad.database.cloudapi.de',
portal='https://portal.microsoftazure.de'),
suffixes=CloudSuffixes(
storage_endpoint='core.cloudapi.de',
keyvault_dns='.vault.microsoftazure.de',
mhsm_dns='.managedhsm.microsoftazure.de',
sql_server_hostname='.database.cloudapi.de',
mysql_server_endpoint='.mysql.database.cloudapi.de',
postgresql_server_endpoint='.postgres.database.cloudapi.de',
mariadb_server_endpoint='.mariadb.database.cloudapi.de'))

AZURE_BLEU_CLOUD = Cloud(
CloudNameEnum.AzureBleuCloud,
endpoints=CloudEndpoints(
Expand Down Expand Up @@ -519,7 +493,7 @@ class CloudNameEnum: # pylint: disable=too-few-public-methods
mariadb_server_endpoint='.mariadb.database.sovcloud-api.fr',
synapse_analytics_endpoint='.dev.azuresynapse.sovcloud-api.fr'))

HARD_CODED_CLOUD_LIST = [AZURE_PUBLIC_CLOUD, AZURE_CHINA_CLOUD, AZURE_US_GOV_CLOUD, AZURE_GERMAN_CLOUD, AZURE_BLEU_CLOUD]
HARD_CODED_CLOUD_LIST = [AZURE_PUBLIC_CLOUD, AZURE_CHINA_CLOUD, AZURE_US_GOV_CLOUD, AZURE_BLEU_CLOUD]


def retrieve_arm_cloud_metadata():
Expand Down
4 changes: 2 additions & 2 deletions src/azure-cli-core/azure/cli/core/tests/test_cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ def test_cloud_is_registered(self):
@mock.patch('azure.cli.core.cloud._set_active_subscription', autospec=True)
def test_switch_active_cloud(self, subscription_setter):
cli = mock.MagicMock()
switch_active_cloud(cli, 'AzureGermanCloud')
self.assertEqual(cli.cloud.name, 'AzureGermanCloud')
switch_active_cloud(cli, 'AzureUSGovernment')
self.assertEqual(cli.cloud.name, 'AzureUSGovernment')

switch_active_cloud(cli, 'AzureChinaCloud')
self.assertEqual(cli.cloud.name, 'AzureChinaCloud')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def validate_registry_name(cmd, namespace):
if registry_login_server_suffix == '' and dnl_hash_index != -1:
raise InvalidArgumentValueError(BAD_REGISTRY_NAME)

# Some clouds do not define 'acr_login_server_endpoint' (e.g. AzureGermanCloud)
# Some clouds do not define 'acr_login_server_endpoint'
if hasattr(suffixes, 'acr_login_server_endpoint'):
acr_suffix = suffixes.acr_login_server_endpoint
if registry_login_server_suffix.lower() == acr_suffix and registry_login_server_suffix != '':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ def validate_registry_name(cmd, namespace):
"""Append login server endpoint suffix."""
registry = namespace.acr
suffixes = cmd.cli_ctx.cloud.suffixes
# Some clouds do not define 'acr_login_server_endpoint' (e.g. AzureGermanCloud)
# Some clouds do not define 'acr_login_server_endpoint'
from azure.cli.core.cloud import CloudSuffixNotSetException
try:
acr_suffix = suffixes.acr_login_server_endpoint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ def test_cloud_set_AzureUSGovernment(self):
self.cmd('az cloud set -n AzureUSGovernment')
self.cmd('az cloud show -n AzureUSGovernment', checks=[self.check('isActive', True)])

@serial_test()
def test_cloud_set_AzureGermanCloud(self):
self.cmd('az cloud set -n AzureGermanCloud')
self.cmd('az cloud show -n AzureGermanCloud', checks=[self.check('isActive', True)])

@serial_test()
def test_cloud_set_AzureBleuCloud(self):
self.cmd('az cloud set -n AzureBleuCloud')
Expand All @@ -62,11 +57,6 @@ def test_cloud_set_azureusgovernment(self):
self.cmd('az cloud set -n azureusgovernment')
self.cmd('az cloud show -n AzureUSGovernment', checks=[self.check('isActive', True)])

@serial_test()
def test_cloud_set_azuregermancloud(self):
self.cmd('az cloud set -n azuregermancloud')
self.cmd('az cloud show -n AzureGermanCloud', checks=[self.check('isActive', True)])

@serial_test()
def test_cloud_set_azurebleucloud(self):
self.cmd('az cloud set -n azurebleucloud')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
},
"AzureUSGovernment": {
},
"AzureGermanCloud": {
},
"Stage": {
}
}
2 changes: 0 additions & 2 deletions src/azure-cli/azure/cli/command_modules/rdbms/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
},
"AzureUSGovernment": {
},
"AzureGermanCloud": {
},
"Stage": {
}
}
Loading