Skip to content
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

get latest master #6665

Merged
merged 32 commits into from
Aug 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
66359b8
document async transport requirement (#6541)
chlowell Jul 30, 2019
379c1a1
[AutoPR] alertsmanagement/resource-manager (#5697)
AutorestCI Jul 30, 2019
7a0f5d3
Synchronous username/password auth (#6416)
chlowell Jul 30, 2019
f9f2db1
Synchronous interactive browser authentication (#6466)
chlowell Jul 30, 2019
f583901
we dont need thread locks (#6551)
SuyogSoti Jul 30, 2019
e833df0
KV aiohttp by default (#6563)
lmazuel Jul 31, 2019
95220b7
[AutoPR hanaonazure/resource-manager] Removing monitoring hana instan…
AutorestCI Jul 31, 2019
02e17b7
KV moved paging return type to ItemPaged (#6558)
lmazuel Jul 31, 2019
37c46c6
azure-core history 1.0.0b2 (#6562)
lmazuel Jul 31, 2019
c6ebc93
Make private Cosmos modules private [WIP] (#6329)
bryevdv Jul 31, 2019
d3d96df
Accept extension of JSON content-type (#6583)
lmazuel Jul 31, 2019
d2ed7d8
Remove docdb mgmt package from master (#6585)
lmazuel Jul 31, 2019
92583cf
Revert "Remove docdb mgmt package from master (#6585)" (#6593)
lmazuel Jul 31, 2019
1d86ae8
azure-core black/pylint/mypy (#6581)
lmazuel Aug 1, 2019
a08c25a
adjusting to allow default omission of packages for CI. (#6595)
scbedd Aug 1, 2019
b0bd437
Synchronous device code credential (#6464)
chlowell Aug 1, 2019
f700299
[AutoPR alertsmanagement/resource-manager] fixing subscription id iss…
AutorestCI Aug 1, 2019
64b121c
Remove Configuration from public API (#6603)
chlowell Aug 1, 2019
ccd73c1
[AutoPR] security/resource-manager (#5709)
AutorestCI Aug 1, 2019
33d6e4a
Minimal change to disable code coverage publishing for PRs. (#6614)
mitchdenny Aug 1, 2019
0249a7c
Readme doc update for azure-core (#6611)
lmazuel Aug 1, 2019
e12b658
Mypy fixes for azure.core.tracing (#6590)
SuyogSoti Aug 2, 2019
abc3f20
MyPy azure-core (#6619)
lmazuel Aug 2, 2019
8eb5e9b
Update Key Vault docstrings (#6632)
chlowell Aug 2, 2019
2a7a965
Update Key Vault user agent (#6640)
chlowell Aug 2, 2019
b647582
Update README.md (#6635)
lmazuel Aug 2, 2019
f9ab732
mypy fixes (#6641)
SuyogSoti Aug 2, 2019
46c7ad6
Policies as kwargs for KeyVault (#6616)
lmazuel Aug 3, 2019
5b5ed26
Mypy fixes (#6646)
xiangyan99 Aug 3, 2019
8d17ca3
[AutoPR healthcareapis/resource-manager] Fixed healthcareapi readme.m…
AutorestCI Aug 5, 2019
c257006
fixed bug in maxItemCount propagation for Order by queries (#6608)
Aug 5, 2019
4470f79
Final azure-identity preview 2 changes (#6664)
chlowell Aug 5, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions eng/pipelines/templates/steps/publish-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ steps:
- task: PublishCodeCoverageResults@1
displayName: 'Publish Code Coverage to DevOps'
continueOnError: true
condition: ne(variables['Build.Reason'], 'PullRequest')
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(Build.SourcesDirectory)/coverage.xml'
3 changes: 2 additions & 1 deletion pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ reports=no
# locally-disabled: Warning locally suppressed using disable-msg
# cyclic-import: because of https://github.com/PyCQA/pylint/issues/850
# too-many-arguments: Due to the nature of the CLI many commands have large arguments set which reflect in large arguments set in corresponding methods.
disable=useless-object-inheritance,missing-docstring,locally-disabled,fixme,cyclic-import,too-many-arguments,invalid-name,duplicate-code,too-few-public-methods
# Let's black deal with bad-continuation
disable=useless-object-inheritance,missing-docstring,locally-disabled,fixme,cyclic-import,too-many-arguments,invalid-name,duplicate-code,too-few-public-methods,bad-continuation

[FORMAT]
max-line-length=120
Expand Down
16 changes: 15 additions & 1 deletion scripts/devops_tasks/common_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import sys

DEFAULT_BUILD_PACKAGES = ['azure-keyvault', 'azure-servicebus']
OMITTED_CI_PACKAGES = ['azure-mgmt-documentdb']

# this function is where a glob string gets translated to a list of packages
# It is called by both BUILD (package) and TEST. In the future, this function will be the central location
Expand All @@ -31,7 +32,20 @@ def process_glob_string(glob_string, target_root_dir):
collected_top_level_directories.extend([os.path.dirname(p) for p in globbed])

# dedup, in case we have double coverage from the glob strings. Example: "azure-mgmt-keyvault,azure-mgmt-*"
return list(set(collected_top_level_directories))
collected_directories = list(set(collected_top_level_directories))

# if we have individually queued this specific package, it's obvious that we want to build it specifically
# in this case, do not honor the omission list
if len(collected_directories) == 1:
return collected_directories
# however, if there are multiple packages being built, we should honor the omission list and NOT build the omitted
# packages
else :
return remove_omitted_packages(collected_directories)

def remove_omitted_packages(collected_directories):
return [package_dir for package_dir in collected_directories if os.path.basename(package_dir) not in OMITTED_CI_PACKAGES]


def run_check_call(command_array, working_directory, acceptable_return_codes = [], run_as_shell = False):
try:
Expand Down
2 changes: 0 additions & 2 deletions scripts/devops_tasks/setup_execute_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ def run_tests(targeted_packages, python_version, test_res):
else:
target_dir = root_dir

print(args.glob_string);

targeted_packages = process_glob_string(args.glob_string, target_dir)
test_results_arg = []
if args.test_results:
Expand Down
28 changes: 28 additions & 0 deletions sdk/alertsmanagement/azure-mgmt-alertsmanagement/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,34 @@
Release History
===============

0.2.0rc2 (2019-07-31)
+++++++++++++++++++++

**Bugfix**

- Fixed autogenerated code problems

0.2.0rc1 (2019-07-29)
+++++++++++++++++++++

**Features**

- Added operation AlertsOperations.meta_data
- Added operation group SmartDetectorAlertRulesOperations
- Added operation group ActionRulesOperations

**General breaking changes**

This version uses a next-generation code generator that *might* introduce breaking changes if from some import.
In summary, some modules were incorrectly visible/importable and have been renamed. This fixed several issues caused by usage of classes that were not supposed to be used in the first place.

- AlertsManagementClient cannot be imported from `azure.mgmt.alertsmanagement.alerts_management_client` anymore (import from `azure.mgmt.alertsmanagement` works like before)
- AlertsManagementClientConfiguration import has been moved from `azure.mgmt.alertsmanagement.alerts_management_client` to `azure.mgmt.alertsmanagement`
- A model `MyClass` from a "models" sub-module cannot be imported anymore using `azure.mgmt.alertsmanagement.models.my_class` (import from `azure.mgmt.alertsmanagement.models` works like before)
- An operation class `MyClassOperations` from an `operations` sub-module cannot be imported anymore using `azure.mgmt.alertsmanagement.operations.my_class_operations` (import from `azure.mgmt.alertsmanagement.operations` works like before)

Last but not least, HTTP connection pooling is now enabled by default. You should always use a client as a context manager, or call close(), or use no more than one client per process.

0.1.0 (2018-09-17)
++++++++++++++++++

Expand Down
4 changes: 4 additions & 0 deletions sdk/alertsmanagement/azure-mgmt-alertsmanagement/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
recursive-include tests *.py *.yaml
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py

21 changes: 1 addition & 20 deletions sdk/alertsmanagement/azure-mgmt-alertsmanagement/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,14 @@ This is the Microsoft Azure Alerts Management Client Library.
Azure Resource Manager (ARM) is the next generation of management APIs that
replace the old Azure Service Management (ASM).

This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.
This package has been tested with Python 2.7, 3.5, 3.6 and 3.7.

For the older Azure Service Management (ASM) libraries, see
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.

For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Compatibility
=============

**IMPORTANT**: If you have an earlier version of the azure package
(version < 1.0), you should uninstall it before installing this package.

You can check the version using pip:

.. code:: shell

pip freeze

If you see azure==0.11.0 (or any version below 1.0), uninstall it first:

.. code:: shell

pip uninstall azure


Usage
=====

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
# regenerated.
# --------------------------------------------------------------------------

from .alerts_management_client import AlertsManagementClient
from .version import VERSION
from ._configuration import AlertsManagementClientConfiguration
from ._alerts_management_client import AlertsManagementClient
__all__ = ['AlertsManagementClient', 'AlertsManagementClientConfiguration']

__all__ = ['AlertsManagementClient']
from .version import VERSION

__version__ = VERSION

Original file line number Diff line number Diff line change
Expand Up @@ -11,46 +11,14 @@

from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.operations import Operations
from .operations.alerts_operations import AlertsOperations
from .operations.smart_groups_operations import SmartGroupsOperations
from . import models


class AlertsManagementClientConfiguration(AzureConfiguration):
"""Configuration for AlertsManagementClient
Note that all parameters used to create this instance are saved as instance
attributes.

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: Subscription credentials which uniquely identify
Microsoft Azure subscription. The subscription ID forms part of the URI
for every service call.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not base_url:
base_url = 'http://localhost'

super(AlertsManagementClientConfiguration, self).__init__(base_url)

self.add_user_agent('azure-mgmt-alertsmanagement/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id
from ._configuration import AlertsManagementClientConfiguration
from .operations import Operations
from .operations import AlertsOperations
from .operations import SmartGroupsOperations
from .operations import ActionRulesOperations
from .operations import SmartDetectorAlertRulesOperations
from . import models


class AlertsManagementClient(SDKClient):
Expand All @@ -65,13 +33,15 @@ class AlertsManagementClient(SDKClient):
:vartype alerts: azure.mgmt.alertsmanagement.operations.AlertsOperations
:ivar smart_groups: SmartGroups operations
:vartype smart_groups: azure.mgmt.alertsmanagement.operations.SmartGroupsOperations
:ivar action_rules: ActionRules operations
:vartype action_rules: azure.mgmt.alertsmanagement.operations.ActionRulesOperations
:ivar smart_detector_alert_rules: SmartDetectorAlertRules operations
:vartype smart_detector_alert_rules: azure.mgmt.alertsmanagement.operations.SmartDetectorAlertRulesOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: Subscription credentials which uniquely identify
Microsoft Azure subscription. The subscription ID forms part of the URI
for every service call.
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:param str base_url: Service URL
"""
Expand All @@ -83,7 +53,6 @@ def __init__(
super(AlertsManagementClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2018-05-05'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Expand All @@ -93,3 +62,7 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)
self.smart_groups = SmartGroupsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.action_rules = ActionRulesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.smart_detector_alert_rules = SmartDetectorAlertRulesOperations(
self._client, self.config, self._serialize, self._deserialize)
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from msrestazure import AzureConfiguration

from .version import VERSION


class AlertsManagementClientConfiguration(AzureConfiguration):
"""Configuration for AlertsManagementClient
Note that all parameters used to create this instance are saved as instance
attributes.

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: The ID of the target subscription.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

super(AlertsManagementClientConfiguration, self).__init__(base_url)

# Starting Autorest.Python 4.0.64, make connection pool activated by default
self.keep_alive = True

self.add_user_agent('azure-mgmt-alertsmanagement/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id
Loading