Skip to content

Commit 6c2df58

Browse files
committed
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-python into get_certs_2016
* 'master' of https://github.com/Azure/azure-sdk-for-python: (115 commits) don't want to exclude mgmt. auto-increments are fine here (Azure#13549) add test for opinion in diff sentence (Azure#13524) Change prerelease versioning (Azure#13500) [text analytics] add --pre suffix to pip install (Azure#13523) update changelog (Azure#13369) update release date for Sep (Azure#13370) update release date for Sep (Azure#13371) Sync eng/common directory with azure-sdk-tools repository for Tools PR 946 (Azure#13533) 404 python erroring sanitize_setup. should not be (Azure#13532) Live pipeline issues (Azure#13526) [ServiceBus] Clean up README prior to P6 with doc-owner recommendations. (Azure#13511) Make doc-owner recommended revisions to eventhub readme and samples. (Azure#13518) Fix storage file datalake readme and samples issues (Azure#12512) [EventGrid] Receive Functions (Azure#13428) Tableitem metadata (Azure#13445) modify bing id docstring to mention Bing Entity Search more (Azure#13509) [text analytics] link opinion mining in the readme (Azure#13493) If match headers (Azure#13315) fix authorization header on asyncio requests containing url-encoded chars (Azure#13346) Sync eng/common directory with azure-sdk-tools repository for Tools PR 930 (Azure#13384) ...
2 parents 0920f67 + dfe38f5 commit 6c2df58

File tree

1,799 files changed

+90274
-44709
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,799 files changed

+90274
-44709
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
# PRLabel: %Storage
2626
/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

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ Mypy install and run.
111111
**Example: Invoke tox, breaking into the debugger on failure**
112112
`tox -e whl -c ../../../eng/tox/tox.ini -- --pdb`
113113

114+
### More Reading
115+
116+
We maintain an [additional document](doc/eng_sys_checks.md) that has a ton of detail as to what is actually _happening_ in these executions.
117+
114118
### Dev Feed
115119
Daily dev build version of Azure sdk packages for python are available and are uploaded to Azure devops feed daily. We have also created a tox environment to test a package against dev built version of dependent packages. Below is the link to Azure devops feed.
116120
[`https://dev.azure.com/azure-sdk/public/_packaging?_a=feed&feed=azure-sdk-for-python`](https://dev.azure.com/azure-sdk/public/_packaging?_a=feed&feed=azure-sdk-for-python)

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):

common/smoketest/key_vault_secrets.py

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

9+
1010
class KeyVaultSecrets(KeyVaultBase):
1111
def __init__(self):
12-
credential = self.get_default_credential()
13-
self.secret_client = SecretClient(
14-
vault_url=os.environ["AZURE_PROJECT_URL"], credential=credential
15-
)
16-
12+
args = self.get_client_args()
13+
self.secret_client = SecretClient(**args)
1714
self.secret_name = "secret-name-" + uuid.uuid1().hex
1815
self.secret_Value = "secret-value"
1916

common/smoketest/key_vault_secrets_async.py

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

9+
1010
class KeyVaultSecrets(KeyVaultBaseAsync):
1111
def __init__(self):
12-
credential = self.get_default_credential()
13-
self.secret_client = SecretClient(
14-
vault_url=os.environ["AZURE_PROJECT_URL"], credential=credential
15-
)
12+
args = self.get_client_args()
13+
self.secret_client = SecretClient(**args)
1614
self.secret_name = "secret-name-" + uuid.uuid1().hex
1715
self.secret_value = "secret-value"
1816

doc/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ This folder contains some documentations for this repository:
22

33
The folder structure is the following
44
- [sphinx](./sphinx) : contains the documentation source code for https://azure.github.io/azure-sdk-for-python/
5-
- [dev](./dev) : contains advanced documentation for _developers_ of SDK (not _consumers_ of SDK)
5+
- [dev](./dev) : contains advanced documentation for _developers_ of SDK (not _consumers_ of SDK)
6+
7+
The file [eng_sys_checks](eng_sys_checks.md) is a read up as to what a standard `ci.yml` will actually execute.

0 commit comments

Comments
 (0)