Skip to content

Commit

Permalink
Merge branch 'master' into restapi_auto_sql/resource-manager
Browse files Browse the repository at this point in the history
  • Loading branch information
Zim Kalinowski authored Nov 12, 2019
2 parents 408c7db + 200d7fc commit dc40812
Show file tree
Hide file tree
Showing 4,410 changed files with 837,992 additions and 852,212 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
16 changes: 12 additions & 4 deletions .azure-pipelines/tests-nightly-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,27 @@ jobs:
versionSpec: '3.7'

- script: |
sudo apt-get update
sudo apt-get install build-essential libsqlite3-dev sqlite3 bzip2 libbz2-dev zlib1g-dev libssl-dev openssl libgdbm-dev liblzma-dev libreadline-dev libncursesw5-dev libffi-dev uuid-dev
cd ~/
git clone https://github.com/python/cpython.git
cd cpython
mkdir debug
cd debug
../configure --enable-optimizations --prefix=$HOME
make
make install
export PATH=~/bin:$PATH
export PATH=~/lib:$PATH
export PATH=~/.local/bin:$PATH
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py
python3 -m pip install setuptools wheel
python3 -m pip install tox tox-monorepo packaging twine codecov beautifulsoup4
python3 --version
cd $(Build.SourcesDirectory)
PATH=/home/vsts/bin:$PATH
python3 -m ensurepip
python ./scripts/devops_tasks/setup_execute_tests.py -p python3 "$(BuildTargetingString)" --junitxml="junit/test-results.xml"
displayName: 'Setup - Run Filtered Tests "Nightly" Python'
python3 ./scripts/devops_tasks/setup_execute_tests.py "$(BuildTargetingString)" --junitxml="junit/test_results_38.xml" --toxenv="whl,sdist"
displayName: 'Setup - Run Filtered Tests "Nightly" using Python Edge'
continueOnError: true
- task: PublishTestResults@2
Expand Down
13 changes: 10 additions & 3 deletions .docsettings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ omitted_paths:
- tools/*
- scripts/*
- azure-mgmt-netapp/tests/*
- "azure-mgmt*/*"
- "sdk/azure-mgmt*/*"
- "sdk/*/azure-mgmt*/*"
- "sdk/keyvault/azure-keyvault/*"
- "doc/*"
- "sdk/keyvault/azure-keyvault-*/samples/*"
language: python
root_check_enabled: True
required_readme_sections:
Expand Down Expand Up @@ -48,9 +48,10 @@ known_content_issues:
- ['sdk/loganalytics/azure-loganalytics/README.rst', '#4554']
- ['sdk/servicefabric/azure-servicefabric/README.rst', '#4554']
- ['sdk/core/azure-servicemanagement-legacy/README.rst', '#4554']
- ['sdk/storage/azure-storage-file/swagger/README.md', '#4554']
- ['sdk/storage/azure-storage-file-share/swagger/README.md', '#4554']
- ['sdk/storage/azure-storage-queue/swagger/README.md', '#4554']
- ['sdk/storage/azure-storage-blob/swagger/README.md', '#4554']
- ['sdk/storage/azure-storage-file-datalake/swagger/README.md', '#4554']

# nspckg and common.
- ['sdk/cognitiveservices/azure-cognitiveservices-nspkg/README.rst', 'nspkg and common']
Expand All @@ -65,7 +66,13 @@ known_content_issues:
- ['sdk/core/azure-mgmt-datalake-nspkg/README.rst', 'nspkg and common']
- ['sdk/core/azure-mgmt-nspkg/README.rst', 'nspkg and common']
- ['sdk/core/azure-core/README.md', 'nspkg and common']
- ['sdk/core/azure-core/samples/README.md', 'nspkg and common']
- ['sdk/storage/azure-storage-blob/samples/README.md', 'nspkg and common']
- ['sdk/storage/azure-storage-queue/samples/README.md', 'nspkg and common']
- ['sdk/storage/azure-storage-file-share/samples/README.md', 'nspkg and common']
- ['sdk/storage/azure-storage-file-datalake/samples/README.md', 'nspkg and common']
- ['sdk/appconfiguration/azure-appconfiguration/README.md', 'nspkg and common']
- ['sdk/appconfiguration/azure-appconfiguration/samples/README.md', 'nspkg and common']
- ['sdk/keyvault/azure-keyvault-nspkg/README.md', 'nspkg and common']

# root readme
Expand Down
6 changes: 3 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Instructions for CODEOWNERS file format and automatic build failure notifications:
# https://github.com/Azure/azure-sdk/blob/master/docs/engineering-system/codeowners.md
# https://github.com/Azure/azure-sdk/blob/master/docs/policies/opensource.md#codeowners

###########
# SDK
Expand All @@ -15,7 +15,7 @@
# Service team
/sdk/identity/ @chlowell @schaabs
/sdk/eventhub/ @annatisch @yunhaoling @YijunXieMS
/sdk/storage/ @zezha-msft @annatisch @rakshith91
/sdk/storage/ @zezha-msft @annatisch @rakshith91 @xiafu-msft
/sdk/applicationinsights/ @alexeldeib
/sdk/batch/ @bgklein @matthchr @xingwu1
/sdk/cognitiveservices/azure-cognitiveservices-vision-customvision/ @areddish
Expand All @@ -35,7 +35,7 @@
/sdk/recoveryservices/ @DheerendraRathor
/sdk/servicefabric/ @QingChenmsft @samedder
/sql/sql/ @jaredmoo
/sdk/servicebus/ @annatisch @yunhaoling @YijunXieMS
/sdk/servicebus/ @annatisch @yunhaoling @YijunXieMS @KieranBrantnerMagee

# Management Plane
/**/*mgmt*/ @zikalino
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ code_reports
# Azure Storage test credentials
sdk/storage/azure-storage-blob/tests/settings_real.py
sdk/storage/azure-storage-queue/tests/settings_real.py
sdk/storage/azure-storage-file/tests/settings_real.py
sdk/storage/azure-storage-file-share/tests/settings_real.py
sdk/storage/azure-storage-file-datalake/tests/settings_real.py
*.code-workspace
sdk/cosmos/azure-cosmos/test/test_config.py
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,30 @@ The client libraries are supported on Python 2.7 and 3.5.3 or later.

## Packages available
Each service might have a number of libraries available from each of the following categories:
* [Client - July 2019 Preview](#Client-July-2019-Preview)
* [Client - Stable](#Client-Stable)
* [Client - November 2019 Releases](#Client-November-2019-Releases)
* [Client - Previous Versions](#Client-Previous-Versions)
* [Management](#Management)


### Client: July 2019 Preview
New wave of packages that we are currently releasing in **Preview**. These libraries allow you to use and consume existing resources and interact with them, for example: upload a blob. These libraries share a number of core functionalities such as: retries, logging, transport protocols, authentication protocols, etc. that can be found in the [azure-core](./sdk/core/azure-core) library. You can learn more about these libraries by reading guidelines that they follow [here](https://azuresdkspecs.z5.web.core.windows.net/PythonSpec.html).
### Client: November 2019 Releases
New wave of packages that we are announcing as **GA** and several that are currently releasing in **preview**. These libraries allow you to use and consume existing resources and interact with them, for example: upload a blob. These libraries share a number of core functionalities such as: retries, logging, transport protocols, authentication protocols, etc. that can be found in the [azure-core](./sdk/core/azure-core) library. You can learn more about these libraries by reading guidelines that they follow [here](https://azure.github.io/azure-sdk/python_introduction.html).

The libraries released in July preview:

- [azure-cosmos](./sdk/cosmos/azure-cosmos)
- [azure-eventhubs](./sdk/eventhub/azure-eventhubs)
The libraries released in the November 2019 GA release:
- [azure-keyvault-keys](./sdk/keyvault/azure-keyvault-keys)
- [azure-keyvault-secrets](./sdk/keyvault/azure-keyvault-secrets)
- [azure-identity](./sdk/identity/azure-identity)
- [azure-storage-blob](./sdk/storage/azure-storage-blob)
- [azure-storage-file](./sdk/storage/azure-storage-file)
- [azure-storage-queue](./sdk/storage/azure-storage-queue)

>NOTE: If you need to ensure your code is ready for production use one of the stable libraries.
The libraries released in the November 2019 preview:
- [azure-cosmos](./sdk/cosmos/azure-cosmos)
- [azure-eventhubs](./sdk/eventhub/azure-eventhubs)
- [azure-storage-file-share](./sdk/storage/azure-storage-file-share)

> NOTE: If you need to ensure your code is ready for production use one of the stable, non-preview libraries.
### Client: Stable
Last stable versions of packages that have been provided for usage with Azure and are production-ready. These libraries provide you with similar functionalities to the Preview ones as they allow you to use and consume existing resources and interact with them, for example: upload a blob.
### Client: Previous Versions
Last stable versions of packages that have been provided for usage with Azure and are production-ready. These libraries provide you with similar functionalities to the Preview ones as they allow you to use and consume existing resources and interact with them, for example: upload a blob. They might not implement the [guidelines](https://azure.github.io/azure-sdk/python_introduction.html) or have the same feature set as the Novemeber releases. They do however offer wider coverage of services.

### Management
Libraries which enable you to provision specific resources. They are responsible for directly mirroring and consuming Azure service's REST endpoints. The management libraries use the `azure-mgmt-<service name>` convention for their package names.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
53 changes: 53 additions & 0 deletions common/smoketest/key_vault_certificates.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import os
import uuid
from azure.identity import DefaultAzureCredential
from azure.keyvault.certificates import CertificateClient, CertificatePolicy


class KeyVaultCertificates:
def __init__(self):
# DefaultAzureCredential() expects the following environment variables:
# * AZURE_CLIENT_ID
# * AZURE_CLIENT_SECRET
# * AZURE_TENANT_ID
credential = DefaultAzureCredential()
self.certificate_client = CertificateClient(
vault_url=os.environ["AZURE_PROJECT_URL"], credential=credential
)

self.certificate_name = "cert-name-" + uuid.uuid1().hex

def create_certificate(self):
print("creating certificate...")
self.certificate_client.create_certificate(name=self.certificate_name)
print("\tdone")

def get_certificate(self):
print("Getting a certificate...")
certificate = self.certificate_client.get_certificate_with_policy(name=self.certificate_name)
print("\tdone, certificate: %s." % certificate.name)

def delete_certificate(self):
print("Deleting a certificate...")
deleted_certificate = self.certificate_client.delete_certificate(name=self.certificate_name)
print("\tdone: " + deleted_certificate.name)

def run(self):
print("")
print("------------------------")
print("Key Vault - Certificates\nIdentity - Credential")
print("------------------------")
print("1) Create a certificate")
print("2) Get that certificate")
print("3) Delete that certificate (Clean up the resource)")
print("")

try:
self.create_certificate()
self.get_certificate()
finally:
self.delete_certificate()
54 changes: 54 additions & 0 deletions common/smoketest/key_vault_certificates_async.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import os
import uuid
from azure.identity.aio import DefaultAzureCredential
from azure.keyvault.certificates import CertificatePolicy
from azure.keyvault.certificates.aio import CertificateClient


class KeyVaultCertificates:
def __init__(self):
# DefaultAzureCredential() expects the following environment variables:
# * AZURE_CLIENT_ID
# * AZURE_CLIENT_SECRET
# * AZURE_TENANT_ID
credential = DefaultAzureCredential()
self.certificate_client = CertificateClient(
vault_url=os.environ["AZURE_PROJECT_URL"], credential=credential
)

self.certificate_name = "cert-name-" + uuid.uuid1().hex

async def create_certificate(self):
create_certificate_poller = await self.certificate_client.create_certificate(name=self.certificate_name)
await create_certificate_poller
print("\tdone")

async def get_certificate(self):
print("Getting a certificate...")
certificate = await self.certificate_client.get_certificate_with_policy(name=self.certificate_name)
print(f"\tdone, certificate: {certificate.name}.")

async def delete_certificate(self):
print("Deleting a certificate...")
deleted_certificate = await self.certificate_client.delete_certificate(name=self.certificate_name)
print("\tdone: " + deleted_certificate.name)

async def run(self):
print("")
print("------------------------")
print("Key Vault - Certificates\nIdentity - Credential")
print("------------------------")
print("1) Create a certificate")
print("2) Get that certificate")
print("3) Delete that certificate (Clean up the resource)")
print("")

try:
await self.create_certificate()
await self.get_certificate()
finally:
await self.delete_certificate()
53 changes: 53 additions & 0 deletions common/smoketest/key_vault_keys.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import os
import uuid
from azure.identity import DefaultAzureCredential
from azure.keyvault.keys import KeyClient


class KeyVaultKeys:
def __init__(self):
# DefaultAzureCredential() expects the following environment variables:
# * AZURE_CLIENT_ID
# * AZURE_CLIENT_SECRET
# * AZURE_TENANT_ID
credential = DefaultAzureCredential()
self.key_client = KeyClient(
vault_url=os.environ["AZURE_PROJECT_URL"], credential=credential
)

self.key_name = "key-name-" + uuid.uuid1().hex

def create_rsa_key(self):
print("Creating an RSA key...")
self.key_client.create_rsa_key(name=self.key_name, size=2048, hsm=False)
print("\tdone")

def get_key(self):
print("Getting a key...")
key = self.key_client.get_key(name=self.key_name)
print("\tdone, key: %s." % key.name)

def delete_key(self):
print("Deleting a key...")
deleted_key = self.key_client.delete_key(name=self.key_name)
print("\tdone: " + deleted_key.name)

def run(self):
print("")
print("------------------------")
print("Key Vault - Keys\nIdentity - Credential")
print("------------------------")
print("1) Create a key")
print("2) Get that key")
print("3) Delete that key (Clean up the resource)")
print("")

try:
self.create_rsa_key()
self.get_key()
finally:
self.delete_key()
54 changes: 54 additions & 0 deletions common/smoketest/key_vault_keys_async.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import os
import uuid
from azure.identity.aio import DefaultAzureCredential
from azure.keyvault.keys.aio import KeyClient


class KeyVaultKeys:
def __init__(self):
# DefaultAzureCredential() expects the following environment variables:
# * AZURE_CLIENT_ID
# * AZURE_CLIENT_SECRET
# * AZURE_TENANT_ID
credential = DefaultAzureCredential()
self.key_client = KeyClient(
vault_url=os.environ["AZURE_PROJECT_URL"], credential=credential
)

self.key_name = "key-name-" + uuid.uuid1().hex

async def create_rsa_key(self):
print("Creating an RSA key...")
await self.key_client.create_rsa_key(name=self.key_name, size=2048, hsm=False)
print("\tdone")

async def get_key(self):
print("Getting a key...")
key = await self.key_client.get_key(name=self.key_name)
print(f"\tdone, key: {key.name}.")

async def delete_key(self):
print("Deleting a key...")
deleted_key = await self.key_client.delete_key(name=self.key_name)
print("\tdone: " + deleted_key.name)

async def run(self):

print("")
print("------------------------")
print("Key Vault - Keys\nIdentity - Credential")
print("------------------------")
print("1) Create a key")
print("2) Get that key")
print("3) Delete that key (Clean up the resource)")
print("")

try:
await self.create_rsa_key()
await self.get_key()
finally:
await self.delete_key()
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from azure.keyvault.secrets import SecretClient


class KeyVault:
class KeyVaultSecrets:
def __init__(self):
# DefaultAzureCredential() expects the following environment variables:
# * AZURE_CLIENT_ID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from azure.keyvault.secrets.aio import SecretClient


class KeyVault:
class KeyVaultSecrets:
def __init__(self):
# DefaultAzureCredential() expects the following environment variables:
# * AZURE_CLIENT_ID
Expand Down
4 changes: 4 additions & 0 deletions samples/smoketest/program.py → common/smoketest/program.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import logging
logging.basicConfig()

import smoke_test


try:
import smoke_test_async
except SyntaxError:
Expand Down
Loading

0 comments on commit dc40812

Please sign in to comment.