Skip to content

Commit 20780cb

Browse files
committed
merge master
2 parents 71de398 + 3891c08 commit 20780cb

File tree

1,679 files changed

+67713
-25927
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,679 files changed

+67713
-25927
lines changed

.github/CODEOWNERS

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@
2323
/sdk/eventhub/ @annatisch @yunhaoling @YijunXieMS
2424

2525
# PRLabel: %Storage
26-
/sdk/storage/ @amishra-dev @zezha-msft @annatisch @rakshith91 @xiafu-msft @kasobol-msft
26+
/sdk/storage/ @amishra-dev @zezha-msft @annatisch @rakshith91 @xiafu-msft @tasherif-msft @kasobol-msft
2727

28-
/sdk/applicationinsights/ @alexeldeib
28+
/sdk/applicationinsights/ @alexeldeib
2929

3030
# PRLabel: %Batch
3131
/sdk/batch/ @bgklein @xingwu1
32-
/sdk/cognitiveservices/azure-cognitiveservices-vision-customvision/ @areddish
32+
/sdk/cognitiveservices/azure-cognitiveservices-vision-customvision/ @areddish
3333

3434
# PRLabel: %KeyVault
3535
/sdk/keyvault/ @schaabs @chlowell @iscai-msft
@@ -52,7 +52,7 @@
5252

5353
# PRLabel: %Data Factory
5454
/sdk/datafactory/ @hvermis
55-
/sdk/datalake/ @ro-joowan
55+
/sdk/datalake/ @ro-joowan
5656
/sdk/datadatamigration/ @vchske
5757

5858
# PRLabel: %Event Grid
@@ -88,6 +88,9 @@
8888
# PRLabel: %Cognitive - Form Recognizer
8989
/sdk/formrecognizer/ @kristapratico @iscai-msft @rakshith91
9090

91+
# PRLabel: %Tables
92+
/sdk/tables/ @seankane-msft
93+
9194
# Smoke Tests
9295
/common/smoketest/ @lmazuel @chlowell @annatisch @rakshith91 @shurd @southpolesteve
9396

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ src/build
8484

8585
# [begoldsm] ignore virtual env if it exists.
8686
adlEnv/
87-
87+
venv/
8888
code_reports
8989

9090
# Azure Storage test credentials

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Packages](https://img.shields.io/badge/packages-latest-blue.svg)](https://azure.github.io/azure-sdk/releases/latest/python.html) [![Dependencies](https://img.shields.io/badge/dependency-report-blue.svg)](https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-python/dependencies/dependencies.html) [![DepGraph](https://img.shields.io/badge/dependency-graph-blue.svg)](https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-python/dependencies/InterdependencyGraph.html) [![Python](https://img.shields.io/pypi/pyversions/azure-core.svg?maxAge=2592000)](https://pypi.python.org/pypi/azure/) [![Build Status](https://dev.azure.com/azure-sdk/public/_apis/build/status/python/python%20-%20core%20-%20ci?branchName=master)](https://dev.azure.com/azure-sdk/public/_build/latest?definitionId=458&branchName=master)
44

5-
This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our [public developer docs](https://docs.microsoft.com/en-us/python/azure/) or our versioned [developer docs](https://azure.github.io/azure-sdk-for-python).
5+
This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our [public developer docs](https://docs.microsoft.com/python/azure/) or our versioned [developer docs](https://azure.github.io/azure-sdk-for-python).
66

77
## Getting started
88

SECURITY.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
66

7-
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below.
7+
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below.
88

99
## Reporting Security Issues
1010

1111
**Please do not report security vulnerabilities through public GitHub issues.**
1212

1313
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report).
1414

15-
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc).
15+
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/msrc/pgp-key-msrc).
1616

1717
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
1818

@@ -36,6 +36,6 @@ We prefer all communications to be in English.
3636

3737
## Policy
3838

39-
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).
39+
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/msrc/cvd).
4040

4141
<!-- END MICROSOFT SECURITY.MD BLOCK -->

common/smoketest/key_vault_base.py

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
1+
# ------------------------------------
2+
# Copyright (c) Microsoft Corporation.
3+
# Licensed under the MIT License.
4+
# ------------------------------------
15
import os
2-
from azure.identity import DefaultAzureCredential, KnownAuthorities
6+
from azure.identity import AzureAuthorityHosts, DefaultAzureCredential
7+
38

49
class KeyVaultBase:
510
credential_type = DefaultAzureCredential
611
host_alias_map = {
7-
'AzureChinaCloud': KnownAuthorities.AZURE_CHINA,
8-
'AzureGermanCloud': KnownAuthorities.AZURE_GERMANY,
9-
'AzureUSGovernment': KnownAuthorities.AZURE_GOVERNMENT,
10-
'AzureCloud': KnownAuthorities.AZURE_PUBLIC_CLOUD,
12+
"AzureChinaCloud": (AzureAuthorityHosts.AZURE_CHINA, "2016-10-01"),
13+
"AzureGermanCloud": (AzureAuthorityHosts.AZURE_GERMANY, "2016-10-01"),
14+
"AzureUSGovernment": (AzureAuthorityHosts.AZURE_GOVERNMENT, "2016-10-01"),
15+
"AzureCloud": (AzureAuthorityHosts.AZURE_PUBLIC_CLOUD, "7.1"),
1116
}
1217

13-
# Instantiate a default credential based on the credential_type
14-
def get_default_credential(self, authority_host_alias=None):
15-
alias = authority_host_alias or os.environ.get("AZURE_CLOUD")
16-
authority_host = self.host_alias_map.get(alias, KnownAuthorities.AZURE_PUBLIC_CLOUD)
17-
return self.credential_type(authority=authority_host)
18+
def get_client_args(self, authority_host_alias=None):
19+
alias = authority_host_alias or os.environ.get("AZURE_CLOUD", "AzureCloud")
20+
authority_host, api_version = self.host_alias_map[alias]
21+
credential = self.credential_type(authority=authority_host)
22+
return {"api_version": api_version, "credential": credential, "vault_url": os.environ["AZURE_PROJECT_URL"]}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
# ------------------------------------
2+
# Copyright (c) Microsoft Corporation.
3+
# Licensed under the MIT License.
4+
# ------------------------------------
15
from key_vault_base import KeyVaultBase
26
from azure.identity.aio import DefaultAzureCredential
37

8+
49
class KeyVaultBaseAsync(KeyVaultBase):
510
credential_type = DefaultAzureCredential

common/smoketest/key_vault_certificates.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,15 @@
22
# Copyright (c) Microsoft Corporation.
33
# Licensed under the MIT License.
44
# ------------------------------------
5-
import os
65
import uuid
76
from azure.keyvault.certificates import CertificateClient, CertificatePolicy
87
from key_vault_base import KeyVaultBase
98

9+
1010
class KeyVaultCertificates(KeyVaultBase):
1111
def __init__(self):
12-
13-
credential = self.get_default_credential()
14-
self.certificate_client = CertificateClient(
15-
vault_url=os.environ["AZURE_PROJECT_URL"], credential=credential
16-
)
17-
12+
args = self.get_client_args()
13+
self.certificate_client = CertificateClient(**args)
1814
self.certificate_name = "cert-name-" + uuid.uuid1().hex
1915

2016
def create_certificate(self):

common/smoketest/key_vault_certificates_async.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,16 @@
22
# Copyright (c) Microsoft Corporation.
33
# Licensed under the MIT License.
44
# ------------------------------------
5-
import os
65
import uuid
76
from azure.keyvault.certificates import CertificatePolicy
87
from azure.keyvault.certificates.aio import CertificateClient
98
from key_vault_base_async import KeyVaultBaseAsync
109

10+
1111
class KeyVaultCertificates(KeyVaultBaseAsync):
1212
def __init__(self):
13-
credential = self.get_default_credential()
14-
self.certificate_client = CertificateClient(
15-
vault_url=os.environ["AZURE_PROJECT_URL"], credential=credential
16-
)
17-
13+
args = self.get_client_args()
14+
self.certificate_client = CertificateClient(**args)
1815
self.certificate_name = "cert-name-" + uuid.uuid1().hex
1916

2017
async def create_certificate(self):

common/smoketest/key_vault_keys.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,15 @@
22
# Copyright (c) Microsoft Corporation.
33
# Licensed under the MIT License.
44
# ------------------------------------
5-
import os
65
import uuid
76
from azure.keyvault.keys import KeyClient
87
from key_vault_base import KeyVaultBase
98

109

1110
class KeyVaultKeys(KeyVaultBase):
1211
def __init__(self):
13-
credential = self.get_default_credential()
14-
self.key_client = KeyClient(
15-
vault_url=os.environ["AZURE_PROJECT_URL"], credential=credential
16-
)
17-
12+
args = self.get_client_args()
13+
self.key_client = KeyClient(**args)
1814
self.key_name = "key-name-" + uuid.uuid1().hex
1915

2016
def create_rsa_key(self):

common/smoketest/key_vault_keys_async.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,15 @@
22
# Copyright (c) Microsoft Corporation.
33
# Licensed under the MIT License.
44
# ------------------------------------
5-
import os
65
import uuid
76
from azure.keyvault.keys.aio import KeyClient
87
from key_vault_base_async import KeyVaultBaseAsync
98

109

1110
class KeyVaultKeys(KeyVaultBaseAsync):
1211
def __init__(self):
13-
14-
credential = self.get_default_credential()
15-
self.key_client = KeyClient(
16-
vault_url=os.environ["AZURE_PROJECT_URL"], credential=credential
17-
)
18-
12+
args = self.get_client_args()
13+
self.key_client = KeyClient(**args)
1914
self.key_name = "key-name-" + uuid.uuid1().hex
2015

2116
async def create_rsa_key(self):

0 commit comments

Comments
 (0)