Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 37 additions & 1 deletion azure-mgmt-servicebus/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,46 @@
Release History
===============

0.4.1 (XXXXXXXXXX)
0.5.0 (2018-04-26)
++++++++++++++++++

**General Breaking changes**

This version uses a next-generation code generator that *might* introduce breaking changes.

- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments.
To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments.
- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered.
While this is not a breaking change, the distinctions are important, and are documented here:
https://docs.python.org/3/library/enum.html#others
At a glance:

- "is" should not be used at all.
- "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered.

- New Long Running Operation:

- Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same.
- Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used.
- The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`,
without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`.
- New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`,
the response of the initial call will be returned without polling.
- `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`.
- `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away.

**SDK Features**

- Client class can be used as a context manager to keep the underlying HTTP session open for performance

**ServiceBus features**

- Add dead_lettering_on_filter_evaluation_exceptions
- Add enable_batched_operations property to ServiceBus Queue
- Add migration_config operations
- Add skip and top to list commands
- Add 'properties' to CorrelationFilter
- Remove 'enableSubscriptionPartitioning' deprecated property

0.4.0 (2017-12-12)
++++++++++++++++++
Expand Down
4 changes: 2 additions & 2 deletions azure-mgmt-servicebus/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ Usage
=====

For code examples, see `Service Bus Management
<https://azure-sdk-for-python.readthedocs.org/en/latest/sample_azure-mgmt-servicebus.html>`__
on readthedocs.org.
<https://docs.microsoft.com/python/api/overview/azure/servicebus>`__
on docs.microsoft.com.


Provide Feedback
Expand Down
97 changes: 67 additions & 30 deletions azure-mgmt-servicebus/azure/mgmt/servicebus/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,40 +9,75 @@
# regenerated.
# --------------------------------------------------------------------------

from .tracked_resource import TrackedResource
from .resource import Resource
from .resource_namespace_patch import ResourceNamespacePatch
from .sb_sku import SBSku
from .sb_namespace import SBNamespace
from .sb_namespace_update_parameters import SBNamespaceUpdateParameters
from .sb_authorization_rule import SBAuthorizationRule
from .authorization_rule_properties import AuthorizationRuleProperties
from .access_keys import AccessKeys
from .regenerate_access_key_parameters import RegenerateAccessKeyParameters
from .message_count_details import MessageCountDetails
from .sb_queue import SBQueue
from .sb_topic import SBTopic
from .sb_subscription import SBSubscription
from .check_name_availability import CheckNameAvailability
from .check_name_availability_result import CheckNameAvailabilityResult
from .operation_display import OperationDisplay
from .operation import Operation
from .error_response import ErrorResponse, ErrorResponseException
from .action import Action
from .sql_filter import SqlFilter
from .correlation_filter import CorrelationFilter
from .rule import Rule
from .sql_rule_action import SqlRuleAction
from .premium_messaging_regions_properties import PremiumMessagingRegionsProperties
from .premium_messaging_regions import PremiumMessagingRegions
from .destination import Destination
from .capture_description import CaptureDescription
from .eventhub import Eventhub
from .arm_disaster_recovery import ArmDisasterRecovery
try:
from .tracked_resource_py3 import TrackedResource
from .resource_py3 import Resource
from .resource_namespace_patch_py3 import ResourceNamespacePatch
from .sb_sku_py3 import SBSku
from .sb_namespace_py3 import SBNamespace
from .sb_namespace_update_parameters_py3 import SBNamespaceUpdateParameters
from .sb_authorization_rule_py3 import SBAuthorizationRule
from .authorization_rule_properties_py3 import AuthorizationRuleProperties
from .access_keys_py3 import AccessKeys
from .regenerate_access_key_parameters_py3 import RegenerateAccessKeyParameters
from .message_count_details_py3 import MessageCountDetails
from .sb_queue_py3 import SBQueue
from .sb_topic_py3 import SBTopic
from .sb_subscription_py3 import SBSubscription
from .check_name_availability_py3 import CheckNameAvailability
from .check_name_availability_result_py3 import CheckNameAvailabilityResult
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
from .error_response_py3 import ErrorResponse, ErrorResponseException
from .action_py3 import Action
from .sql_filter_py3 import SqlFilter
from .correlation_filter_py3 import CorrelationFilter
from .rule_py3 import Rule
from .sql_rule_action_py3 import SqlRuleAction
from .premium_messaging_regions_properties_py3 import PremiumMessagingRegionsProperties
from .premium_messaging_regions_py3 import PremiumMessagingRegions
from .destination_py3 import Destination
from .capture_description_py3 import CaptureDescription
from .eventhub_py3 import Eventhub
from .arm_disaster_recovery_py3 import ArmDisasterRecovery
from .migration_config_properties_py3 import MigrationConfigProperties
except (SyntaxError, ImportError):
from .tracked_resource import TrackedResource
from .resource import Resource
from .resource_namespace_patch import ResourceNamespacePatch
from .sb_sku import SBSku
from .sb_namespace import SBNamespace
from .sb_namespace_update_parameters import SBNamespaceUpdateParameters
from .sb_authorization_rule import SBAuthorizationRule
from .authorization_rule_properties import AuthorizationRuleProperties
from .access_keys import AccessKeys
from .regenerate_access_key_parameters import RegenerateAccessKeyParameters
from .message_count_details import MessageCountDetails
from .sb_queue import SBQueue
from .sb_topic import SBTopic
from .sb_subscription import SBSubscription
from .check_name_availability import CheckNameAvailability
from .check_name_availability_result import CheckNameAvailabilityResult
from .operation_display import OperationDisplay
from .operation import Operation
from .error_response import ErrorResponse, ErrorResponseException
from .action import Action
from .sql_filter import SqlFilter
from .correlation_filter import CorrelationFilter
from .rule import Rule
from .sql_rule_action import SqlRuleAction
from .premium_messaging_regions_properties import PremiumMessagingRegionsProperties
from .premium_messaging_regions import PremiumMessagingRegions
from .destination import Destination
from .capture_description import CaptureDescription
from .eventhub import Eventhub
from .arm_disaster_recovery import ArmDisasterRecovery
from .migration_config_properties import MigrationConfigProperties
from .operation_paged import OperationPaged
from .sb_namespace_paged import SBNamespacePaged
from .sb_authorization_rule_paged import SBAuthorizationRulePaged
from .arm_disaster_recovery_paged import ArmDisasterRecoveryPaged
from .migration_config_properties_paged import MigrationConfigPropertiesPaged
from .sb_queue_paged import SBQueuePaged
from .sb_topic_paged import SBTopicPaged
from .sb_subscription_paged import SBSubscriptionPaged
Expand Down Expand Up @@ -93,10 +128,12 @@
'CaptureDescription',
'Eventhub',
'ArmDisasterRecovery',
'MigrationConfigProperties',
'OperationPaged',
'SBNamespacePaged',
'SBAuthorizationRulePaged',
'ArmDisasterRecoveryPaged',
'MigrationConfigPropertiesPaged',
'SBQueuePaged',
'SBTopicPaged',
'SBSubscriptionPaged',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ class AccessKeys(Model):
'key_name': {'key': 'keyName', 'type': 'str'},
}

def __init__(self):
super(AccessKeys, self).__init__()
def __init__(self, **kwargs):
super(AccessKeys, self).__init__(**kwargs)
self.primary_connection_string = None
self.secondary_connection_string = None
self.alias_primary_connection_string = None
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# 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 msrest.serialization import Model


class AccessKeys(Model):
"""Namespace/ServiceBus Connection String.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar primary_connection_string: Primary connection string of the created
namespace authorization rule.
:vartype primary_connection_string: str
:ivar secondary_connection_string: Secondary connection string of the
created namespace authorization rule.
:vartype secondary_connection_string: str
:ivar alias_primary_connection_string: Primary connection string of the
alias if GEO DR is enabled
:vartype alias_primary_connection_string: str
:ivar alias_secondary_connection_string: Secondary connection string of
the alias if GEO DR is enabled
:vartype alias_secondary_connection_string: str
:ivar primary_key: A base64-encoded 256-bit primary key for signing and
validating the SAS token.
:vartype primary_key: str
:ivar secondary_key: A base64-encoded 256-bit primary key for signing and
validating the SAS token.
:vartype secondary_key: str
:ivar key_name: A string that describes the authorization rule.
:vartype key_name: str
"""

_validation = {
'primary_connection_string': {'readonly': True},
'secondary_connection_string': {'readonly': True},
'alias_primary_connection_string': {'readonly': True},
'alias_secondary_connection_string': {'readonly': True},
'primary_key': {'readonly': True},
'secondary_key': {'readonly': True},
'key_name': {'readonly': True},
}

_attribute_map = {
'primary_connection_string': {'key': 'primaryConnectionString', 'type': 'str'},
'secondary_connection_string': {'key': 'secondaryConnectionString', 'type': 'str'},
'alias_primary_connection_string': {'key': 'aliasPrimaryConnectionString', 'type': 'str'},
'alias_secondary_connection_string': {'key': 'aliasSecondaryConnectionString', 'type': 'str'},
'primary_key': {'key': 'primaryKey', 'type': 'str'},
'secondary_key': {'key': 'secondaryKey', 'type': 'str'},
'key_name': {'key': 'keyName', 'type': 'str'},
}

def __init__(self, **kwargs) -> None:
super(AccessKeys, self).__init__(**kwargs)
self.primary_connection_string = None
self.secondary_connection_string = None
self.alias_primary_connection_string = None
self.alias_secondary_connection_string = None
self.primary_key = None
self.secondary_key = None
self.key_name = None
10 changes: 5 additions & 5 deletions azure-mgmt-servicebus/azure/mgmt/servicebus/models/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class Action(Model):
'requires_preprocessing': {'key': 'requiresPreprocessing', 'type': 'bool'},
}

def __init__(self, sql_expression=None, compatibility_level=None, requires_preprocessing=True):
super(Action, self).__init__()
self.sql_expression = sql_expression
self.compatibility_level = compatibility_level
self.requires_preprocessing = requires_preprocessing
def __init__(self, **kwargs):
super(Action, self).__init__(**kwargs)
self.sql_expression = kwargs.get('sql_expression', None)
self.compatibility_level = kwargs.get('compatibility_level', None)
self.requires_preprocessing = kwargs.get('requires_preprocessing', True)
39 changes: 39 additions & 0 deletions azure-mgmt-servicebus/azure/mgmt/servicebus/models/action_py3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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 msrest.serialization import Model


class Action(Model):
"""Represents the filter actions which are allowed for the transformation of a
message that have been matched by a filter expression.

:param sql_expression: SQL expression. e.g. MyProperty='ABC'
:type sql_expression: str
:param compatibility_level: This property is reserved for future use. An
integer value showing the compatibility level, currently hard-coded to 20.
:type compatibility_level: int
:param requires_preprocessing: Value that indicates whether the rule
action requires preprocessing. Default value: True .
:type requires_preprocessing: bool
"""

_attribute_map = {
'sql_expression': {'key': 'sqlExpression', 'type': 'str'},
'compatibility_level': {'key': 'compatibilityLevel', 'type': 'int'},
'requires_preprocessing': {'key': 'requiresPreprocessing', 'type': 'bool'},
}

def __init__(self, *, sql_expression: str=None, compatibility_level: int=None, requires_preprocessing: bool=True, **kwargs) -> None:
super(Action, self).__init__(**kwargs)
self.sql_expression = sql_expression
self.compatibility_level = compatibility_level
self.requires_preprocessing = requires_preprocessing
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ class ArmDisasterRecovery(Resource):
'role': {'key': 'properties.role', 'type': 'RoleDisasterRecovery'},
}

def __init__(self, partner_namespace=None, alternate_name=None):
super(ArmDisasterRecovery, self).__init__()
def __init__(self, **kwargs):
super(ArmDisasterRecovery, self).__init__(**kwargs)
self.provisioning_state = None
self.partner_namespace = partner_namespace
self.alternate_name = alternate_name
self.partner_namespace = kwargs.get('partner_namespace', None)
self.alternate_name = kwargs.get('alternate_name', None)
self.role = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# 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 .resource import Resource


class ArmDisasterRecovery(Resource):
"""Single item in List or Get Alias(Disaster Recovery configuration)
operation.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
:ivar provisioning_state: Provisioning state of the Alias(Disaster
Recovery configuration) - possible values 'Accepted' or 'Succeeded' or
'Failed'. Possible values include: 'Accepted', 'Succeeded', 'Failed'
:vartype provisioning_state: str or
~azure.mgmt.servicebus.models.ProvisioningStateDR
:param partner_namespace: ARM Id of the Primary/Secondary eventhub
namespace name, which is part of GEO DR pairning
:type partner_namespace: str
:param alternate_name: Primary/Secondary eventhub namespace name, which is
part of GEO DR pairning
:type alternate_name: str
:ivar role: role of namespace in GEO DR - possible values 'Primary' or
'PrimaryNotReplicating' or 'Secondary'. Possible values include:
'Primary', 'PrimaryNotReplicating', 'Secondary'
:vartype role: str or ~azure.mgmt.servicebus.models.RoleDisasterRecovery
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'provisioning_state': {'readonly': True},
'role': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningStateDR'},
'partner_namespace': {'key': 'properties.partnerNamespace', 'type': 'str'},
'alternate_name': {'key': 'properties.alternateName', 'type': 'str'},
'role': {'key': 'properties.role', 'type': 'RoleDisasterRecovery'},
}

def __init__(self, *, partner_namespace: str=None, alternate_name: str=None, **kwargs) -> None:
super(ArmDisasterRecovery, self).__init__(**kwargs)
self.provisioning_state = None
self.partner_namespace = partner_namespace
self.alternate_name = alternate_name
self.role = None
Loading