Skip to content

Commit

Permalink
[AutoPR] alertsmanagement/resource-manager (#5697)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
AutorestCI authored and Zim Kalinowski committed Jul 30, 2019
1 parent 66359b8 commit 379c1a1
Show file tree
Hide file tree
Showing 57 changed files with 5,003 additions and 2,191 deletions.
21 changes: 21 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,27 @@
Release History
===============

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,6 +33,10 @@ 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
Expand All @@ -73,17 +45,18 @@ class AlertsManagementClient(SDKClient):
Microsoft Azure subscription. The subscription ID forms part of the URI
for every service call.
:type subscription_id: str
:param subscription_id1: The Azure subscription id.
:type subscription_id1: str
:param str base_url: Service URL
"""

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

self.config = AlertsManagementClientConfiguration(credentials, subscription_id, base_url)
self.config = AlertsManagementClientConfiguration(credentials, subscription_id, subscription_id1, base_url)
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 +66,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,55 @@
# 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: 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 subscription_id1: The Azure subscription id.
:type subscription_id1: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, subscription_id1, 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 subscription_id1 is None:
raise ValueError("Parameter 'subscription_id1' 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
self.subscription_id1 = subscription_id1
Loading

0 comments on commit 379c1a1

Please sign in to comment.