Skip to content
Merged
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

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -660,12 +660,6 @@ def test_mysql_private_link_scenario(self, resource_group, server, database_engi
self._test_private_link_resource(resource_group, server, 'Microsoft.DBforMySQL/servers', 'mysqlServer')
self._test_private_endpoint_connection(resource_group, server, database_engine, 'Microsoft.DBforMySQL/servers')

@ResourceGroupPreparer()
@ServerPreparer(engine_type='postgres')
def test_postgres_private_link_scenario(self, resource_group, server, database_engine):
self._test_private_link_resource(resource_group, server, 'Microsoft.DBforPostgreSQL/servers', 'postgresqlServer')
self._test_private_endpoint_connection(resource_group, server, database_engine, 'Microsoft.DBforPostgreSQL/servers')

def _test_private_link_resource(self, resource_group, server, database_engine, group_id):
result = self.cmd('network private-link-resource list -g {} --name {} --type {}'
.format(resource_group, server, database_engine)).get_output_in_json()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,30 +85,6 @@ def get_mysql_flexible_management_client(cli_ctx, **_):
return get_mgmt_service_client(cli_ctx, MySQLManagementClient)


def get_postgresql_management_client(cli_ctx, **_):
from os import getenv
from azure.mgmt.rdbms.postgresql import PostgreSQLManagementClient

# Allow overriding resource manager URI using environment variable
# for testing purposes. Subscription id is also determined by environment
# variable.
rm_uri_override = getenv(RM_URI_OVERRIDE)
if rm_uri_override:
client_id = getenv(AZURE_CLIENT_ID)
if client_id:
credentials = get_environment_credential()
else:
from msrest.authentication import Authentication # pylint: disable=import-error
credentials = Authentication()

return PostgreSQLManagementClient(
subscription_id=getenv(SUB_ID_OVERRIDE),
base_url=rm_uri_override,
credential=credentials)
# Normal production scenario.
return get_mgmt_service_client(cli_ctx, PostgreSQLManagementClient)


def get_postgresql_flexible_management_client(cli_ctx, subscription_id=None, **_):
from os import getenv
from azure.mgmt.postgresqlflexibleservers import PostgreSQLManagementClient
Expand Down Expand Up @@ -141,10 +117,6 @@ def cf_mysql_servers(cli_ctx, _):
return get_mysql_management_client(cli_ctx).servers


def cf_postgres_servers(cli_ctx, _):
return get_postgresql_management_client(cli_ctx).servers


def cf_mariadb_firewall_rules(cli_ctx, _):
return get_mariadb_management_client(cli_ctx).firewall_rules

Expand All @@ -153,10 +125,6 @@ def cf_mysql_firewall_rules(cli_ctx, _):
return get_mysql_management_client(cli_ctx).firewall_rules


def cf_postgres_firewall_rules(cli_ctx, _):
return get_postgresql_management_client(cli_ctx).firewall_rules


def cf_mariadb_config(cli_ctx, _):
return get_mariadb_management_client(cli_ctx).configurations

Expand All @@ -165,10 +133,6 @@ def cf_mysql_config(cli_ctx, _):
return get_mysql_management_client(cli_ctx).configurations


def cf_postgres_config(cli_ctx, _):
return get_postgresql_management_client(cli_ctx).configurations


def cf_mariadb_log(cli_ctx, _):
return get_mariadb_management_client(cli_ctx).log_files

Expand All @@ -177,10 +141,6 @@ def cf_mysql_log(cli_ctx, _):
return get_mysql_management_client(cli_ctx).log_files


def cf_postgres_log(cli_ctx, _):
return get_postgresql_management_client(cli_ctx).log_files


def cf_mariadb_db(cli_ctx, _):
return get_mariadb_management_client(cli_ctx).databases

Expand All @@ -189,10 +149,6 @@ def cf_mysql_db(cli_ctx, _):
return get_mysql_management_client(cli_ctx).databases


def cf_postgres_db(cli_ctx, _):
return get_postgresql_management_client(cli_ctx).databases


def cf_mariadb_virtual_network_rules_operations(cli_ctx, _):
return get_mariadb_management_client(cli_ctx).virtual_network_rules

Expand All @@ -201,10 +157,6 @@ def cf_mysql_virtual_network_rules_operations(cli_ctx, _):
return get_mysql_management_client(cli_ctx).virtual_network_rules


def cf_postgres_virtual_network_rules_operations(cli_ctx, _):
return get_postgresql_management_client(cli_ctx).virtual_network_rules


def cf_mariadb_replica(cli_ctx, _):
return get_mariadb_management_client(cli_ctx).replicas

Expand All @@ -213,10 +165,6 @@ def cf_mysql_replica(cli_ctx, _):
return get_mysql_management_client(cli_ctx).replicas


def cf_postgres_replica(cli_ctx, _):
return get_postgresql_management_client(cli_ctx).replicas


def cf_mariadb_private_endpoint_connections_operations(cli_ctx, _):
return get_mariadb_management_client(cli_ctx).private_endpoint_connections

Expand All @@ -233,30 +181,14 @@ def cf_mysql_private_link_resources_operations(cli_ctx, _):
return get_mysql_management_client(cli_ctx).private_link_resources


def cf_postgres_private_endpoint_connections_operations(cli_ctx, _):
return get_postgresql_management_client(cli_ctx).private_endpoint_connections


def cf_postgres_private_link_resources_operations(cli_ctx, _):
return get_postgresql_management_client(cli_ctx).private_link_resources


def cf_mysql_server_keys_operations(cli_ctx, _):
return get_mysql_management_client(cli_ctx).server_keys


def cf_postgres_server_keys_operations(cli_ctx, _):
return get_postgresql_management_client(cli_ctx).server_keys


def cf_mysql_server_ad_administrators_operations(cli_ctx, _):
return get_mysql_management_client(cli_ctx).server_administrators


def cf_postgres_server_ad_administrators_operations(cli_ctx, _):
return get_postgresql_management_client(cli_ctx).server_administrators


def cf_mariadb_check_resource_availability_sterling(cli_ctx, _):
return get_mariadb_management_client(cli_ctx).check_name_availability

Expand All @@ -265,18 +197,10 @@ def cf_mysql_check_resource_availability_sterling(cli_ctx, _):
return get_mysql_management_client(cli_ctx).check_name_availability


def cf_postgres_check_resource_availability_sterling(cli_ctx, _):
return get_postgresql_management_client(cli_ctx).check_name_availability


def cf_mysql_location_based_performance_tier_operations(cli_ctx, _):
return get_mysql_management_client(cli_ctx).location_based_performance_tier


def cf_postgres_location_based_performance_tier_operations(cli_ctx, _):
return get_postgresql_management_client(cli_ctx).location_based_performance_tier


def cf_mariadb_location_based_performance_tier_operations(cli_ctx, _):
return get_mariadb_management_client(cli_ctx).location_based_performance_tier

Expand Down
Loading
Loading