Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into path_format_args_polling

* 'master' of https://github.com/Azure/azure-sdk-for-python: (46 commits)
  Fix typo in track 2 migration guide (Azure#14006)
  commit metrics advisor (Azure#14072)
  [eventgrid] Update README.md (Azure#14030)
  Update Key Vault readmes (Azure#14068)
  Update CODEOWNERS (Azure#14054)
  Correct azure-eventhub example (Azure#14050)
  Replace docstring code blocks with literalincludes (Azure#13948)
  Added more docstring context and sample code for `receive_messages()` (Azure#13789)
  Form 2.1-preview.1 (Azure#13770)
  Sync eng/common directory with azure-sdk-tools repository for Tools PR 1029 (Azure#13896)
  Service Mapping Update for Communication (Azure#13979)
  update sample to show facet+count & collection type (Azure#13909)
  Increment package version after release of azure_eventgrid (Azure#14020)
  Update CHANGELOG.md (Azure#14014)
  fixed delete blob types (Azure#14001)
  Fixed issues with resource token (Azure#13855)
  update samples and readme (Azure#13999)
  update dependent version of azure-core (Azure#13986)
  Sync eng/common directory with azure-sdk-tools repository for Tools PR 1041 (Azure#14005)
  Track2-azure-mgmt-baremetalinfrastructure-2020-9-22 (Azure#13941)
  ...
  • Loading branch information
iscai-msft committed Sep 29, 2020
2 parents f2eb48a + 8053071 commit 1832a1e
Show file tree
Hide file tree
Showing 1,200 changed files with 221,779 additions and 51,956 deletions.
9 changes: 7 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,16 @@
# PRLabel: %Storage
/sdk/storage/ @amishra-dev @zezha-msft @annatisch @rakshith91 @xiafu-msft @tasherif-msft @kasobol-msft

/sdk/applicationinsights/ @alexeldeib
/sdk/applicationinsights/azure-applicationinsights/ @divya-jay @geneh @alongafni
/sdk/loganalytics/azure-loganalytics/ @divya-jay @geneh @alongafni

# PRLabel: %Batch
/sdk/batch/ @bgklein @xingwu1
/sdk/cognitiveservices/azure-cognitiveservices-vision-customvision/ @areddish

# PRLabel: %Communication
/sdk/communication/ @RezaJooyandeh @turalf

# PRLabel: %KeyVault
/sdk/keyvault/ @schaabs @chlowell @iscai-msft

Expand Down Expand Up @@ -101,7 +105,8 @@
/common/smoketest/ @lmazuel @chlowell @annatisch @rakshith91 @shurd @southpolesteve

# Management Plane
/**/*mgmt*/ @zikalino
/**/*mgmt*/ @msyyc @jsntcy @changlong-liu


###########
# Eng Sys
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ You can find the [most up to date list of all of the new packages on our page](h
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: New Releases
A new set of management libraries that follow the [Azure SDK Design Guidelines for Python](https://azure.github.io/azure-sdk/python/guidelines/) are now in Public Preview. These new libraries provide a number of core capabilities that are shared amongst all Azure SDKs, including the intuitive Azure Identity library, an HTTP Pipeline with custom policies, error-handling, distributed tracing, and much more.
You can find the list of new packages [on this page](https://azure.github.io/azure-sdk/releases/latest/mgmt/python.html). Documentation and for these new libraries can be found [here](https://aka.ms/azure-sdk-python-mgmt). Code samples can also be viewed [here](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing). In addition, a migration guide that shows how to transition from older versions of libraries is located [here](https://github.com/Azure/azure-sdk-for-python/blob/master/doc/sphinx/python_mgmt_migration_guide.rst).
A new set of management libraries that follow the [Azure SDK Design Guidelines for Python](https://azure.github.io/azure-sdk/python/guidelines/) are now available. These new libraries provide a number of core capabilities that are shared amongst all Azure SDKs, including the intuitive Azure Identity library, an HTTP Pipeline with custom policies, error-handling, distributed tracing, and much more.
Documentation and code samples for these new libraries can be found [here](http://aka.ms/azsdk/python/mgmt). In addition, a migration guide that shows how to transition from older versions of libraries is located [here](https://azure.github.io/azure-sdk-for-python/mgmt_preview_quickstart.html#migration-guide).

> NOTE: If you need to ensure your code is ready for production use one of the stable, non-preview libraries.
You can find the [most up to date list of all of the new packages on our page](https://azure.github.io/azure-sdk/releases/latest/mgmt/python.html)

> NOTE: If you need to ensure your code is ready for production use one of the stable, non-preview libraries. Also, if you are experiencing authentication issues with the management libraries after upgrading certain packages, it's possible that you upgraded to the new versions of SDK without changing the authentication code, please refer to the migration guide mentioned above for proper instructions.
### Management: Previous Versions
For a complete list of management libraries which enable you to provision and manage Azure resources, please check [here](https://azure.github.io/azure-sdk/releases/latest/all/python.html). They might not have the same feature set as the new releases but they do offer wider coverage of services.
For a complete list of management libraries which enable you to provision and manage Azure resources, please [check here](https://azure.github.io/azure-sdk/releases/latest/all/python.html). They might not have the same feature set as the new releases but they do offer wider coverage of services.
Management libraries can be identified by namespaces that start with `azure-mgmt-`, e.g. `azure-mgmt-compute`

## Need help?
Expand Down
2 changes: 1 addition & 1 deletion doc/sphinx/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ section of the project.

installation
quickstart_authentication
mgmt_preview_quickstart
mgmt_quickstart
python_mgmt_migration_guide
multicloud
exceptions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
Quickstart Tutorial - Resource Management (Preview Libraries)
Quickstart Tutorial - Resource Management
===============================================================

We are excited to announce that a new set of management libraries are now in Public Preview.
We are excited to announce that a new set of management libraries are now generally available.
Those packages share a number of new features such as Azure Identity support,
HTTP pipeline, error-handling.,etc, and they also follow the new Azure SDK guidelines which
create easy-to-use APIs that are idiomatic, compatible, and dependable.

You can find the details of those new libraries `here <https://azure.github.io/azure-sdk/releases/latest/#python>`__
You can find the details of those new libraries `here <https://azure.github.io/azure-sdk/releases/latest/mgmt/python.html>`__

In this basic quickstart guide, we will walk you through how to
authenticate to Azure using the preview libraries and start interacting with
authenticate to Azure using the new libraries and start interacting with
Azure resources. There are several possible approaches to
authentication. This document illustrates the most common scenario

Migration Guide
---------------
If you are an existing user of the older version of Azure management library for Python and you are looking for a migration guide to the new beta version of the SDK, please refer to `this migration guide here <https://github.com/Azure/azure-sdk-for-python/blob/master/doc/sphinx/python_mgmt_migration_guide.rst>`__
If you are an existing user of the older version of Azure management library for Python and you are looking for a migration guide to the new version of the SDK, please refer to `this migration guide here <https://github.com/Azure/azure-sdk-for-python/blob/master/doc/sphinx/python_mgmt_migration_guide.rst>`__

Prerequisites
-------------
Expand Down Expand Up @@ -253,11 +253,11 @@ Note that asyncio in Windows is underpowered and please take caution when using
Code Samples
-------------------------
For more code samples that demonstrate how to use our SDK to interact with Azure services, please visit `here <https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing>`__
For more code samples that demonstrate how to use our SDK to interact with Azure services, please visit `here <https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing>`__. You can also view the Github repo that contains the code samples `here <https://github.com/Azure-Samples/azure-samples-python-management>`__

Need help?
----------
- File an issue via `Github Issues <https://github.com/Azure/azure-sdk-for-python/issues>`__ and make sure you add the "Preview" label to the issue
- File an issue via `Github Issues <https://github.com/Azure/azure-sdk-for-python/issues>`__
- Check `previous questions <https://stackoverflow.com/questions/tagged/azure+python>`__ or ask new ones on StackOverflow using azure and python tags.

Contributing
Expand Down
20 changes: 20 additions & 0 deletions doc/sphinx/package_service_mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,26 @@
"category": "Other",
"service_name": "Other"
},
"azure-communication-administration": {
"category": "Client",
"service_name": "Communication",
"manually_generated": true
},
"azure-communication-chat": {
"category": "Client",
"service_name": "Communication",
"manually_generated": true
},
"azure-communication-sms": {
"category": "Client",
"service_name": "Communication",
"manually_generated": true
},
"azure-mgmt-communication": {
"category": "Management",
"service_name": "Communication",
"manually_generated": true
},
"azure-eventgrid": {
"category": "Client",
"namespaces": [
Expand Down
37 changes: 20 additions & 17 deletions doc/sphinx/python_mgmt_migration_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ libraries

For users new to the Python SDK for resource management libraries,
please see the `quickstart
guide <http://aka.ms/azure-sdk-python-mgmt>`__
guide <http://aka.ms/azsdk/python/mgmt>`__

Table of contents
-----------------
Expand All @@ -32,21 +32,23 @@ Prerequisites
Updated Python Packages
-----------------------

Currently, all next-generation Python SDK management client libraries
are in Public Preview. The preview version SDK will be contain a ``b``
in its version to number to indicate that it's a beta release (e.g.
``17.0.0b1``). The versioning information can be found on the release
history page of each Azure service on pypi.org. Take Azure Compute
service for example, the release history can be found at
`https://pypi.org/project/azure-mgmt-compute/17.0.0b1/history <https://pypi.org/project/azure-mgmt-compute/17.0.0b1/#history>`__

You can also refer to the `this
You can refer to the `this
site <https://azure.github.io/azure-sdk/releases/latest/mgmt/python.html>`__
to see all the latest Python packages.
to see all the new Python packages.

For packages that are already generally available (GA), you can directly install the package using pip. Take Azure Compute
service for example, simply do:
``pip install azure-mgmt-compute``

The release history for azure-mgmt-compute can be found at `https://pypi.org/project/azure-mgmt-compute/#history <https://pypi.org/project/azure-mgmt-compute/#history>`__

Please install the package based on the beta version number, for
example, to install the latest preview package for Compute, please use:
``pip install azure-mgmt-compute==17.0.0b1``
You will notice that there was a beta release in release history, and the changelog for this version mentioned that "this version uses a next-generation code generator that introduces important breaking changes". This indicates the package is based on the new generator.

In addition, some next-generation Python SDK management client libraries might still in Public Preview. The preview version SDK will be contain a ``b`` in its version to number to indicate that it's a beta release (e.g.``10.0.0b1``).

For those beta releases, please install the package based on the beta version number, for
example, to install the latest preview package for BetaServiceExample, please use:
``pip install azure-mgmt-beta-service-example==10.0.0b1``

General Changes
---------------
Expand Down Expand Up @@ -100,14 +102,14 @@ To the show the code snippets for the change:
from azure.identity import ClientSecretCredential
credential = ClientSecretCredential(
tenant_id=tenant_id,
client_secret=client_secret,
client_id=client_id,
tenant_id=tenant_id
)
compute_client = azure.mgmt.compute.ComputeManagementClient(credential=credential, subscription_id=self.subscription_id)
For detailed information on the benefits of using the new authentication
classes, please refer to `this
classes as well as all available authentication options, please refer to `this
page <https://docs.microsoft.com/azure/developer/python/azure-sdk-authenticate?view=azure-python&tabs=cmd>`__

Client API Changes
Expand Down Expand Up @@ -154,7 +156,7 @@ Additional Samples

More samples can be found at :

- `Quickstart for new version of SDK <http://aka.ms/azure-sdk-python-mgmt>`__
- `Quickstart for new version of SDK <http://aka.ms/azsdk/python/mgmt>`__
- `Code Samples for Resource Management Libraries <https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing>`__
- `Authentication Documentation <https://docs.microsoft.com/azure/developer/python/azure-sdk-authenticate?view=azure-python&tabs=cmd>`__

Expand All @@ -165,3 +167,4 @@ If you have encountered an issue during migration, please file an issue
via `Github
Issues <https://github.com/Azure/azure-sdk-for-python/issues>`__ and
make sure you add the "Preview" label to the issue

4 changes: 2 additions & 2 deletions eng/.docsettings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ known_content_issues:
- ['sdk/synapse/azure-synapse-artifacts/README.md', '#4554']
- ['sdk/synapse/azure-synapse-nspkg/README.md', '#4554']
- ['sdk/anomalydetector/azure-ai-anomalydetector/README.md', '#4554']
- ['sdk/metricsadvisor/azure-ai-metricsadvisor/README.md', '#4554']
- ['sdk/applicationinsights/azure-applicationinsights/README.md', '#4554']
- ['sdk/batch/azure-batch/README.md', '#4554']
- ['sdk/cognitiveservices/azure-cognitiveservices-anomalydetector/README.md', '#4554']
Expand Down Expand Up @@ -124,8 +125,7 @@ known_content_issues:
- ['sdk/eventhub/azure-eventhub/samples/README.md', 'nspkg and common']
- ['sdk/tables/azure-data-nspkg/README.md', 'nspkg and common']
- ['sdk/cosmos/README.md', 'nspkg and common']


- ['sdk/communication/azure-communication-nspkg/README.md', 'nspkg and common']
# HISTORY.rst
- ['sdk/core/azure/HISTORY.rst','#4554']

Expand Down
1 change: 1 addition & 0 deletions eng/ci_tools.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# requirements leveraged by ci tools
cryptography==3.1
setuptools==44.1.0; python_version == '2.7'
setuptools==46.4.0; python_version >= '3.5'
virtualenv==20.0.23
Expand Down
2 changes: 1 addition & 1 deletion eng/common/TestResources/deploy-test-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ steps:
@subscriptionConfiguration `
-CI `
-Force `
-Verbose
-Verbose | Out-Null
displayName: Deploy test resources
45 changes: 23 additions & 22 deletions eng/common/scripts/copy-docs-to-blobstorage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -257,30 +257,31 @@ if ($Language -eq "javascript")

if ($Language -eq "dotnet")
{
$PublishedPkgs = Get-ChildItem "$($DocLocation)/packages" | Where-Object -FilterScript {$_.Name.EndsWith(".nupkg") -and -not $_.Name.EndsWith(".symbols.nupkg")}
$PublishedDocs = Get-ChildItem "$($DocLocation)" | Where-Object -FilterScript {$_.Name.StartsWith("Docs.")}
$PublishedPkgs = Get-ChildItem "$($DocLocation)" | Where-Object -FilterScript {$_.Name.EndsWith(".nupkg") -and -not $_.Name.EndsWith(".symbols.nupkg")}
$PublishedDocs = Get-ChildItem "$($DocLocation)" | Where-Object -FilterScript {$_.Name.EndsWith("docs.zip")}

foreach ($Item in $PublishedDocs) {
$PkgName = $Item.Name.Remove(0, 5)
$PkgFullName = $PublishedPkgs | Where-Object -FilterScript {$_.Name -match "$($PkgName).\d"}

if (($PkgFullName | Measure-Object).count -eq 1)
{
$DocVersion = $PkgFullName[0].BaseName.Remove(0, $PkgName.Length + 1)

Write-Host "Start Upload for $($PkgName)/$($DocVersion)"
Write-Host "DocDir $($Item)"
Write-Host "PkgName $($PkgName)"
Write-Host "DocVersion $($DocVersion)"
$releaseTag = RetrieveReleaseTag "Nuget" $PublicArtifactLocation
Upload-Blobs -DocDir "$($Item)" -PkgName $PkgName -DocVersion $DocVersion -ReleaseTag $releaseTag
}
else
{
Write-Host "Package with the same name Exists. Upload Skipped"
continue
}
if (($PublishedPkgs.Count -gt 1) -or ($PublishedDoc.Count -gt 1))
{
Write-Host "$($DocLocation) should contain only one (1) published package and docs"
Write-Host "No of Packages $($PublishedPkgs.Count)"
Write-Host "No of Docs $($PublishedDoc.Count)"
exit 1
}

$DocsStagingDir = "$WorkingDirectory/docstaging"
$TempDir = "$WorkingDirectory/temp"

New-Item -ItemType directory -Path $DocsStagingDir
New-Item -ItemType directory -Path $TempDir

Expand-Archive -LiteralPath $PublishedDocs[0].FullName -DestinationPath $DocsStagingDir
$pkgProperties = ParseNugetPackage -pkg $PublishedPkgs[0].FullName -workingDirectory $TempDir

Write-Host "Start Upload for $($pkgProperties.ReleaseTag)"
Write-Host "DocDir $($DocsStagingDir)"
Write-Host "PkgName $($pkgProperties.PackageId)"
Write-Host "DocVersion $($pkgProperties.PackageVersion)"
Upload-Blobs -DocDir "$($DocsStagingDir)" -PkgName $pkgProperties.PackageId -DocVersion $pkgProperties.PackageVersion -ReleaseTag $pkgProperties.ReleaseTag
}

if ($Language -eq "python")
Expand Down
1 change: 1 addition & 0 deletions eng/tox/allowed_pylint_failures.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,5 @@
"azure-synapse-accesscontrol",
"azure-synapse-nspkg",
"azure-ai-anomalydetector",
"azure-ai-metricsadvisor",
]
11 changes: 7 additions & 4 deletions scripts/devops_tasks/common_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
# this assumes the presence of "packaging"
from packaging.specifiers import SpecifierSet
from packaging.version import Version
from packaging.version import parse


DEV_REQ_FILE = "dev_requirements.txt"
Expand Down Expand Up @@ -340,13 +341,15 @@ def find_whl(package_name, version, whl_directory):
logging.error("Whl directory is incorrect")
exit(1)

logging.info("Searching whl for package {}".format(package_name))
whl_name = "{0}-{1}*.whl".format(package_name.replace("-", "_"), version)
parsed_version = parse(version)

logging.info("Searching whl for package {0}-{1}".format(package_name, parsed_version.base_version))
whl_name = "{0}-{1}*.whl".format(package_name.replace("-", "_"), parsed_version.base_version)
paths = glob.glob(os.path.join(whl_directory, whl_name))
if not paths:
logging.error(
"whl is not found in whl directory {0} for package {1}".format(
whl_directory, package_name
"whl is not found in whl directory {0} for package {1}-{2}".format(
whl_directory, package_name, parsed_version.base_version
)
)
exit(1)
Expand Down
1 change: 1 addition & 0 deletions scripts/devops_tasks/git_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
'azure-cosmos': '3.2.0',
'azure-servicebus': '0.50.3',
'azure-eventgrid': '1.3.0',
'azure-schemaregistry-avroserializer': '1.0.0b1'
}

# This method identifies release tag for latest or oldest released version of a given package
Expand Down
4 changes: 4 additions & 0 deletions sdk/appconfiguration/azure-appconfiguration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,3 +303,7 @@ additional questions or comments.
[configuration_store]: https://azure.microsoft.com/services/app-configuration/
[default_cred_ref]: https://aka.ms/azsdk-python-identity-default-cred-ref
[azure_identity]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/identity/azure-identity
[cla]: https://cla.microsoft.com
[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
[coc_contact]: mailto:opencode@microsoft.com
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async def main():
returned_config_setting.content_type = "new content type"
await client.set_configuration_setting(config_setting)

items = client.list_revisions(keys=["MyKey"])
items = client.list_revisions(key_filter="MyKey")
async for item in items:
print_configuration_setting(item)
print("")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def main():
returned_config_setting.content_type = "new content type"
client.set_configuration_setting(config_setting)

items = client.list_revisions(keys=["MyKey"])
items = client.list_revisions(key_filter="MyKey")
for item in items:
print_configuration_setting(item)
print("")
Expand Down
2 changes: 1 addition & 1 deletion sdk/appconfiguration/azure-appconfiguration/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
packages=find_packages(exclude=exclude_packages),
install_requires=[
"msrest>=0.6.10",
"azure-core<2.0.0,>=1.0.0",
"azure-core<2.0.0,>=1.2.2",
],
extras_require={
":python_version<'3.0'": ['azure-nspkg'],
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
-e ../../../tools/azure-sdk-tools
msrestazure
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Release History

## 1.0.0b1 (2020-09-22)

* Initial Release
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
include azure/mgmt/__init__.py

Loading

0 comments on commit 1832a1e

Please sign in to comment.