Skip to content

Commit a3bb5d8

Browse files
authored
get latest (#6666)
* App config code review feedback (#6647) * Use new configuration * Put version into version.py * update packaging * remove readme.rst * get latest master (#6665) * document async transport requirement (#6541) * [AutoPR] alertsmanagement/resource-manager (#5697) * Generated from f4b30b3785ae1fa51f4333f2acd863137d9c84b2 (#5696) removed "required" field from ExpandDetectorParameter * Packaging update of azure-mgmt-alertsmanagement * Packaging update of azure-mgmt-alertsmanagement * regenerated package * recent version * update history and version... again... * added note about general breaking changes * Synchronous username/password auth (#6416) * Synchronous interactive browser authentication (#6466) * we dont need thread locks (#6551) * KV aiohttp by default (#6563) * Aiohttp default async transport * Record keys with aiohttp * Record secrets with aiohttp * [AutoPR hanaonazure/resource-manager] Removing monitoring hana instance API (#6535) * Generated from 70b51057c4cca0cdb6a743b4e02f39c132121570 Removing monitoring hana instance API * Generated from a6757c439ed37f69147b6a7b50a20f1ca69789be Removing monitoring hana instance API * Packaging update of azure-mgmt-hanaonazure * Updated Release History * KV moved paging return type to ItemPaged (#6558) * KV with latest autorest * Make KV return ItemPaged from azure-core * azure-core history 1.0.0b2 (#6562) * azure-core history * Update HISTORY.md * Make private Cosmos modules private [WIP] (#6329) * make consistent_hash_ring private * make default_retry_policy private * make endpoint_discovery_retry_policy private * make hash_partition_resolver private * make location_cache private * make murmur_hash private * make range private * make range_partition_resolver private * make vector_session_token private * make resource_throttle_retry_policy private * make retry_utility private * make utils private * make routing private * make execution_context private * make cosmos_client_connection private * make retry_options private * make query_iterable private * make constants private * make synchronized_request private * make session_retry_policy private * make partition private * make global_endpoint_manager private * make runtime_constants private * make session private * make request_object private * make base private * Accept extension of JSON content-type (#6583) * Accept extension of JSON content-type * Adding text/something+json test * Support digit * Remove docdb mgmt package from master (#6585) * Revert "Remove docdb mgmt package from master (#6585)" (#6593) This reverts commit d2ed7d8. * azure-core black/pylint/mypy (#6581) * Pylint/black happyness * mypy * Fix exceptiont tests * bad-continuation ignroe by defulat * adjusting to allow default omission of packages for CI. (#6595) * Synchronous device code credential (#6464) * [AutoPR alertsmanagement/resource-manager] fixing subscription id issue (#6574) * Generated from d6b1b67df4f4ddc0b8cb16095d1dd51305a078a5 fix subscriptionId * Generated from 10bf6ed3f7f87035d0c08c83742eba0a39602b39 undone reference change * added changelog, upgraded to rc2 * fixed code generation issues * Remove Configuration from public API (#6603) * [AutoPR] security/resource-manager (#5709) * Generated from 2b4c25b67ef444e5fb6df8a4a4d78bfa747b198a (#5704) chore: jsonfmt security Ran `jsonfmt -w "specification/security/**/*.json"` * [AutoPR security/resource-manager] Changes to the JIT API for Firewall Support (#6047) * Generated from 0a90b13aa3eeec05f438be7bbe0eb444a084e789 Update jitNetworkAccessPolicies.json * Generated from 77db60c613fff13703dc99ca4aaa81bfbd4900ef Update jitNetworkAccessPolicies.json * Generated from 77db60c613fff13703dc99ca4aaa81bfbd4900ef Update jitNetworkAccessPolicies.json * Packaging update of azure-mgmt-security * [AutoPR security/resource-manager] Improving Security Center pricing API documentation (#6289) * Generated from 149ce8a94fd12df4868cb641d0d47bf83472b659 Improving Security Center pricing API documentation * Generated from 149ce8a94fd12df4868cb641d0d47bf83472b659 Improving Security Center pricing API documentation * [AutoPR security/resource-manager] Add Microsoft.Security applicationWhitelistings API (#6262) * Generated from 0bc0b6465c2c93267a29e4eb0c39e2b12a8b623e add operation ID's * Generated from 56fe4277e879002f98abc961fc5fb3abf80cf32a remove location from example, add Executable to fileType * Generated from 6307743902cd21e4a200cca1cddc2383121ae216 add Whitelistings to custom-words * Generated from 01357ba2f4e4ca899217b4e65892b7bdf375d5bf (#6515) chore: jsonfmt security * [AutoPR security/resource-manager] Set IoTSecuritySolutions & IoTSecuritySolutionAnalytics API as stable (#6526) * Generated from 4d6fbc52713c0423aa04f74ae330867fac488b86 Set IoTSecuritySolutions & IoTSecuritySolutionAnalytics API as stable * Generated from e763a96421ef60d69bbae038d008c08002f16359 remove paging support from IoTSecurityDeviceRecommendationsList * Generated from dea80a5e1da4b383480342bba4eca97ba55c053b remove paging from IoTSecurityAlertedDevicesList * regenerated * history and version * general breaking changes info * Minimal change to disable code coverage publishing for PRs. (#6614) * Readme doc update for azure-core (#6611) * Readme doc update * More readme update * Transport update * Typo * typo thanks bryan * Mypy fixes for azure.core.tracing (#6590) * we dont need thread locks * add contextvars * fix version stuff * mypy fixes * added test for get_name and moved stuff in the function * small ci fix * more mypy fixes * get rid of dependency * all use same context * MyPy azure-core (#6619) * MyPy azure-core settings * MyPy azure-core aiohttp * Redesign sentinel * Update Key Vault docstrings (#6632) * Update Key Vault user agent (#6640) * Update README.md (#6635) * mypy fixes (#6641) * mypy fixes * use six * Policies as kwargs for KeyVault (#6616) * Mypy fixes (#6646) * [AutoPR healthcareapis/resource-manager] Fixed healthcareapi readme.md (#6652) * Generated from 06bfc11dfa82fb5c140c82c3496fd59adc6f3b8b just triggereing rebuild * Packaging update of azure-mgmt-healthcareapis * fixed release date * fixed bug in maxItemCount propagation for Order by queries (#6608) * fixed bug with maxItemCount in order by queries * fixed merge conflicts * Final azure-identity preview 2 changes (#6664)
1 parent 89d36fc commit a3bb5d8

File tree

437 files changed

+30686
-23004
lines changed

Some content is hidden

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

437 files changed

+30686
-23004
lines changed

eng/pipelines/templates/steps/publish-coverage.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ steps:
1313
- task: PublishCodeCoverageResults@1
1414
displayName: 'Publish Code Coverage to DevOps'
1515
continueOnError: true
16+
condition: ne(variables['Build.Reason'], 'PullRequest')
1617
inputs:
1718
codeCoverageTool: Cobertura
1819
summaryFileLocation: '$(Build.SourcesDirectory)/coverage.xml'

pylintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ reports=no
77
# locally-disabled: Warning locally suppressed using disable-msg
88
# cyclic-import: because of https://github.com/PyCQA/pylint/issues/850
99
# 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.
10-
disable=useless-object-inheritance,missing-docstring,locally-disabled,fixme,cyclic-import,too-many-arguments,invalid-name,duplicate-code,too-few-public-methods
10+
# Let's black deal with bad-continuation
11+
disable=useless-object-inheritance,missing-docstring,locally-disabled,fixme,cyclic-import,too-many-arguments,invalid-name,duplicate-code,too-few-public-methods,bad-continuation
1112

1213
[FORMAT]
1314
max-line-length=120

scripts/devops_tasks/common_tasks.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import sys
1616

1717
DEFAULT_BUILD_PACKAGES = ['azure-keyvault', 'azure-servicebus']
18+
OMITTED_CI_PACKAGES = ['azure-mgmt-documentdb']
1819

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

3334
# dedup, in case we have double coverage from the glob strings. Example: "azure-mgmt-keyvault,azure-mgmt-*"
34-
return list(set(collected_top_level_directories))
35+
collected_directories = list(set(collected_top_level_directories))
36+
37+
# if we have individually queued this specific package, it's obvious that we want to build it specifically
38+
# in this case, do not honor the omission list
39+
if len(collected_directories) == 1:
40+
return collected_directories
41+
# however, if there are multiple packages being built, we should honor the omission list and NOT build the omitted
42+
# packages
43+
else :
44+
return remove_omitted_packages(collected_directories)
45+
46+
def remove_omitted_packages(collected_directories):
47+
return [package_dir for package_dir in collected_directories if os.path.basename(package_dir) not in OMITTED_CI_PACKAGES]
48+
3549

3650
def run_check_call(command_array, working_directory, acceptable_return_codes = [], run_as_shell = False):
3751
try:

scripts/devops_tasks/setup_execute_tests.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ def run_tests(targeted_packages, python_version, test_res):
9595
else:
9696
target_dir = root_dir
9797

98-
print(args.glob_string);
99-
10098
targeted_packages = process_glob_string(args.glob_string, target_dir)
10199
test_results_arg = []
102100
if args.test_results:

sdk/alertsmanagement/azure-mgmt-alertsmanagement/HISTORY.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,34 @@
33
Release History
44
===============
55

6+
0.2.0rc2 (2019-07-31)
7+
+++++++++++++++++++++
8+
9+
**Bugfix**
10+
11+
- Fixed autogenerated code problems
12+
13+
0.2.0rc1 (2019-07-29)
14+
+++++++++++++++++++++
15+
16+
**Features**
17+
18+
- Added operation AlertsOperations.meta_data
19+
- Added operation group SmartDetectorAlertRulesOperations
20+
- Added operation group ActionRulesOperations
21+
22+
**General breaking changes**
23+
24+
This version uses a next-generation code generator that *might* introduce breaking changes if from some import.
25+
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.
26+
27+
- AlertsManagementClient cannot be imported from `azure.mgmt.alertsmanagement.alerts_management_client` anymore (import from `azure.mgmt.alertsmanagement` works like before)
28+
- AlertsManagementClientConfiguration import has been moved from `azure.mgmt.alertsmanagement.alerts_management_client` to `azure.mgmt.alertsmanagement`
29+
- 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)
30+
- 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)
31+
32+
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.
33+
634
0.1.0 (2018-09-17)
735
++++++++++++++++++
836

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
recursive-include tests *.py *.yaml
12
include *.rst
3+
include azure/__init__.py
4+
include azure/mgmt/__init__.py
5+

sdk/alertsmanagement/azure-mgmt-alertsmanagement/README.rst

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,14 @@ This is the Microsoft Azure Alerts Management Client Library.
66
Azure Resource Manager (ARM) is the next generation of management APIs that
77
replace the old Azure Service Management (ASM).
88

9-
This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.
9+
This package has been tested with Python 2.7, 3.5, 3.6 and 3.7.
1010

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

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

1616

17-
Compatibility
18-
=============
19-
20-
**IMPORTANT**: If you have an earlier version of the azure package
21-
(version < 1.0), you should uninstall it before installing this package.
22-
23-
You can check the version using pip:
24-
25-
.. code:: shell
26-
27-
pip freeze
28-
29-
If you see azure==0.11.0 (or any version below 1.0), uninstall it first:
30-
31-
.. code:: shell
32-
33-
pip uninstall azure
34-
35-
3617
Usage
3718
=====
3819

sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
# regenerated.
1010
# --------------------------------------------------------------------------
1111

12-
from .alerts_management_client import AlertsManagementClient
13-
from .version import VERSION
12+
from ._configuration import AlertsManagementClientConfiguration
13+
from ._alerts_management_client import AlertsManagementClient
14+
__all__ = ['AlertsManagementClient', 'AlertsManagementClientConfiguration']
1415

15-
__all__ = ['AlertsManagementClient']
16+
from .version import VERSION
1617

1718
__version__ = VERSION
1819

Lines changed: 16 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -11,46 +11,14 @@
1111

1212
from msrest.service_client import SDKClient
1313
from msrest import Serializer, Deserializer
14-
from msrestazure import AzureConfiguration
15-
from .version import VERSION
16-
from .operations.operations import Operations
17-
from .operations.alerts_operations import AlertsOperations
18-
from .operations.smart_groups_operations import SmartGroupsOperations
19-
from . import models
20-
21-
22-
class AlertsManagementClientConfiguration(AzureConfiguration):
23-
"""Configuration for AlertsManagementClient
24-
Note that all parameters used to create this instance are saved as instance
25-
attributes.
26-
27-
:param credentials: Credentials needed for the client to connect to Azure.
28-
:type credentials: :mod:`A msrestazure Credentials
29-
object<msrestazure.azure_active_directory>`
30-
:param subscription_id: Subscription credentials which uniquely identify
31-
Microsoft Azure subscription. The subscription ID forms part of the URI
32-
for every service call.
33-
:type subscription_id: str
34-
:param str base_url: Service URL
35-
"""
3614

37-
def __init__(
38-
self, credentials, subscription_id, base_url=None):
39-
40-
if credentials is None:
41-
raise ValueError("Parameter 'credentials' must not be None.")
42-
if subscription_id is None:
43-
raise ValueError("Parameter 'subscription_id' must not be None.")
44-
if not base_url:
45-
base_url = 'http://localhost'
46-
47-
super(AlertsManagementClientConfiguration, self).__init__(base_url)
48-
49-
self.add_user_agent('azure-mgmt-alertsmanagement/{}'.format(VERSION))
50-
self.add_user_agent('Azure-SDK-For-Python')
51-
52-
self.credentials = credentials
53-
self.subscription_id = subscription_id
15+
from ._configuration import AlertsManagementClientConfiguration
16+
from .operations import Operations
17+
from .operations import AlertsOperations
18+
from .operations import SmartGroupsOperations
19+
from .operations import ActionRulesOperations
20+
from .operations import SmartDetectorAlertRulesOperations
21+
from . import models
5422

5523

5624
class AlertsManagementClient(SDKClient):
@@ -65,13 +33,15 @@ class AlertsManagementClient(SDKClient):
6533
:vartype alerts: azure.mgmt.alertsmanagement.operations.AlertsOperations
6634
:ivar smart_groups: SmartGroups operations
6735
:vartype smart_groups: azure.mgmt.alertsmanagement.operations.SmartGroupsOperations
36+
:ivar action_rules: ActionRules operations
37+
:vartype action_rules: azure.mgmt.alertsmanagement.operations.ActionRulesOperations
38+
:ivar smart_detector_alert_rules: SmartDetectorAlertRules operations
39+
:vartype smart_detector_alert_rules: azure.mgmt.alertsmanagement.operations.SmartDetectorAlertRulesOperations
6840
6941
:param credentials: Credentials needed for the client to connect to Azure.
7042
:type credentials: :mod:`A msrestazure Credentials
7143
object<msrestazure.azure_active_directory>`
72-
:param subscription_id: Subscription credentials which uniquely identify
73-
Microsoft Azure subscription. The subscription ID forms part of the URI
74-
for every service call.
44+
:param subscription_id: The ID of the target subscription.
7545
:type subscription_id: str
7646
:param str base_url: Service URL
7747
"""
@@ -83,7 +53,6 @@ def __init__(
8353
super(AlertsManagementClient, self).__init__(self.config.credentials, self.config)
8454

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

@@ -93,3 +62,7 @@ def __init__(
9362
self._client, self.config, self._serialize, self._deserialize)
9463
self.smart_groups = SmartGroupsOperations(
9564
self._client, self.config, self._serialize, self._deserialize)
65+
self.action_rules = ActionRulesOperations(
66+
self._client, self.config, self._serialize, self._deserialize)
67+
self.smart_detector_alert_rules = SmartDetectorAlertRulesOperations(
68+
self._client, self.config, self._serialize, self._deserialize)
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
from msrestazure import AzureConfiguration
12+
13+
from .version import VERSION
14+
15+
16+
class AlertsManagementClientConfiguration(AzureConfiguration):
17+
"""Configuration for AlertsManagementClient
18+
Note that all parameters used to create this instance are saved as instance
19+
attributes.
20+
21+
:param credentials: Credentials needed for the client to connect to Azure.
22+
:type credentials: :mod:`A msrestazure Credentials
23+
object<msrestazure.azure_active_directory>`
24+
:param subscription_id: The ID of the target subscription.
25+
:type subscription_id: str
26+
:param str base_url: Service URL
27+
"""
28+
29+
def __init__(
30+
self, credentials, subscription_id, base_url=None):
31+
32+
if credentials is None:
33+
raise ValueError("Parameter 'credentials' must not be None.")
34+
if subscription_id is None:
35+
raise ValueError("Parameter 'subscription_id' must not be None.")
36+
if not base_url:
37+
base_url = 'https://management.azure.com'
38+
39+
super(AlertsManagementClientConfiguration, self).__init__(base_url)
40+
41+
# Starting Autorest.Python 4.0.64, make connection pool activated by default
42+
self.keep_alive = True
43+
44+
self.add_user_agent('azure-mgmt-alertsmanagement/{}'.format(VERSION))
45+
self.add_user_agent('Azure-SDK-For-Python')
46+
47+
self.credentials = credentials
48+
self.subscription_id = subscription_id

0 commit comments

Comments
 (0)