-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[RDBMS] Python SDK migration #17191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
[RDBMS] Python SDK migration #17191
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
bf63231
flexible server migration
DaeunYim a018b7d
single server migration draft
DaeunYim 65fe403
style fixed
DaeunYim 5abef3c
allow large reponse for proxy test
DaeunYim 8b16281
singles server test fixed
DaeunYim 75cd854
minor bugs fixed
DaeunYim 822c738
linter and style issues fixed
DaeunYim dfe3896
config files added
DaeunYim bdd876c
empty commit
DaeunYim 7a144d7
empty commit
DaeunYim ecd6dd2
pulled dev repo
DaeunYim 6d83a71
pulled from dev
DaeunYim 221f2e4
fix recording files for the migration code
DaeunYim f037cac
fixed mariadb failing test case
DaeunYim 8acc000
fix for failing test cases
DaeunYim 8fd0fa0
fixed typo
DaeunYim 0c25766
Merge branch 'dev' of https://github.com/Azure/azure-cli into python-…
DaeunYim fdce3c9
change datetime function to accomodate python 3.6
DaeunYim cc30375
takes care of two different time input
DaeunYim ab1eb2e
style fixed
DaeunYim 7486023
bug fix auth, LRO polling commands, object create by dict
DaeunYim 0ef1240
empty commit
DaeunYim 98b9265
Merge branch 'dev' into python-sdk-migration-2
DaeunYim 3d71790
id = child name fix
DaeunYim bb840b3
Merge branch 'python-sdk-migration-2' of https://github.com/DaeunYim/…
DaeunYim 45703ac
Merge branch 'dev' of https://github.com/Azure/azure-cli into python-…
DaeunYim 945de4d
network module test failure fixed
DaeunYim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
776 changes: 374 additions & 402 deletions
776
...i/command_modules/network/tests/latest/recordings/test_mariadb_private_link_scenario.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,19 +26,19 @@ def get_mariadb_management_client(cli_ctx, **_): | |
| if rm_uri_override: | ||
| client_id = getenv(CLIENT_ID) | ||
| if client_id: | ||
| from azure.common.credentials import ServicePrincipalCredentials | ||
| credentials = ServicePrincipalCredentials( | ||
| from azure.identity import ClientSecretCredential | ||
| credentials = ClientSecretCredential( | ||
| client_id=client_id, | ||
| secret=getenv(CLIENT_SECRET), | ||
| tenant=getenv(TENANT_ID)) | ||
| client_secret=getenv(CLIENT_SECRET), | ||
| tenant_id=getenv(TENANT_ID)) | ||
| else: | ||
| from msrest.authentication import Authentication # pylint: disable=import-error | ||
| credentials = Authentication() | ||
|
|
||
| return MariaDBManagementClient( | ||
| subscription_id=getenv(SUB_ID_OVERRIDE), | ||
| base_url=rm_uri_override, | ||
| credentials=credentials) | ||
| credential=credentials) | ||
| # Normal production scenario. | ||
| return get_mgmt_service_client(cli_ctx, MariaDBManagementClient) | ||
|
|
||
|
|
@@ -54,19 +54,19 @@ def get_mysql_management_client(cli_ctx, **_): | |
| if rm_uri_override: | ||
| client_id = getenv(CLIENT_ID) | ||
| if client_id: | ||
| from azure.common.credentials import ServicePrincipalCredentials | ||
| credentials = ServicePrincipalCredentials( | ||
| from azure.identity import ClientSecretCredential | ||
| credentials = ClientSecretCredential( | ||
| client_id=client_id, | ||
| secret=getenv(CLIENT_SECRET), | ||
| tenant=getenv(TENANT_ID)) | ||
| client_secret=getenv(CLIENT_SECRET), | ||
| tenant_id=getenv(TENANT_ID)) | ||
|
Comment on lines
+57
to
+61
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unless |
||
| else: | ||
| from msrest.authentication import Authentication # pylint: disable=import-error | ||
| credentials = Authentication() | ||
|
|
||
| return MySQLManagementClient( | ||
| subscription_id=getenv(SUB_ID_OVERRIDE), | ||
| base_url=rm_uri_override, | ||
| credentials=credentials) | ||
| credential=credentials) | ||
| # Normal production scenario. | ||
| return get_mgmt_service_client(cli_ctx, MySQLManagementClient) | ||
|
|
||
|
|
@@ -82,19 +82,19 @@ def get_mysql_flexible_management_client(cli_ctx, **_): | |
| if rm_uri_override: | ||
| client_id = getenv(CLIENT_ID) | ||
| if client_id: | ||
| from azure.common.credentials import ServicePrincipalCredentials | ||
| credentials = ServicePrincipalCredentials( | ||
| from azure.identity import ClientSecretCredential | ||
| credentials = ClientSecretCredential( | ||
| client_id=client_id, | ||
| secret=getenv(CLIENT_SECRET), | ||
| tenant=getenv(TENANT_ID)) | ||
| client_secret=getenv(CLIENT_SECRET), | ||
| tenant_id=getenv(TENANT_ID)) | ||
| else: | ||
| from msrest.authentication import Authentication # pylint: disable=import-error | ||
| credentials = Authentication() | ||
|
|
||
| return MySQLManagementClient( | ||
| subscription_id=getenv(SUB_ID_OVERRIDE), | ||
| base_url=rm_uri_override, | ||
| credentials=credentials) | ||
| credential=credentials) | ||
| # Normal production scenario. | ||
| return get_mgmt_service_client(cli_ctx, MySQLManagementClient) | ||
|
|
||
|
|
@@ -110,19 +110,19 @@ def get_postgresql_management_client(cli_ctx, **_): | |
| if rm_uri_override: | ||
| client_id = getenv(CLIENT_ID) | ||
| if client_id: | ||
| from azure.common.credentials import ServicePrincipalCredentials | ||
| credentials = ServicePrincipalCredentials( | ||
| from azure.identity import ClientSecretCredential | ||
| credentials = ClientSecretCredential( | ||
| client_id=client_id, | ||
| secret=getenv(CLIENT_SECRET), | ||
| tenant=getenv(TENANT_ID)) | ||
| client_secret=getenv(CLIENT_SECRET), | ||
| tenant_id=getenv(TENANT_ID)) | ||
| 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, | ||
| credentials=credentials) | ||
| credential=credentials) | ||
| # Normal production scenario. | ||
| return get_mgmt_service_client(cli_ctx, PostgreSQLManagementClient) | ||
|
|
||
|
|
@@ -137,19 +137,19 @@ def get_postgresql_flexible_management_client(cli_ctx, **_): | |
| if rm_uri_override: | ||
| client_id = getenv(CLIENT_ID) | ||
| if client_id: | ||
| from azure.common.credentials import ServicePrincipalCredentials | ||
| credentials = ServicePrincipalCredentials( | ||
| from azure.identity import ClientSecretCredential | ||
| credentials = ClientSecretCredential( | ||
| client_id=client_id, | ||
| secret=getenv(CLIENT_SECRET), | ||
| tenant=getenv(TENANT_ID)) | ||
| client_secret=getenv(CLIENT_SECRET), | ||
| tenant_id=getenv(TENANT_ID)) | ||
| 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, | ||
| credentials=credentials) | ||
| credential=credentials) | ||
| # Normal production scenario. | ||
| return get_mgmt_service_client(cli_ctx, PostgreSQLManagementClient) | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.