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

[ServiceBus] Remove unneeded mgmt properties #13628

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
3 changes: 3 additions & 0 deletions sdk/servicebus/azure-servicebus/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
* Sending a message twice will no longer result in a MessageAlreadySettled exception.
* `ServiceBusClient.close()` now closes spawned senders and receivers.
* Attempting to initialize a sender or receiver with a different connection string entity and specified entity (e.g. `queue_name`) will result in an AuthenticationError
* Remove `is_anonymous_accessible` from management entities.
* Remove `support_ordering` from `create_queue` and `QueueProperties`
* Remove `enable_subscription_partitioning` from `create_topic` and `TopicProperties`
Comment on lines +14 to +16
Copy link
Contributor

@yunhaoling yunhaoling Sep 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a general question: what's the reason behind the removal? because the service doesn't support them or we don't want to expose them?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I must shamefully admit my context was limited to an ask re: cross-language-consistency. We can follow up on this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just apply the changes first


## 7.0.0b5 (2020-08-10)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,6 @@ async def create_queue(self, name: str, **kwargs) -> QueueProperties:
:keyword enable_partitioning: A value that indicates whether the queue is to be partitioned
across multiple message brokers.
:type enable_partitioning: bool
:keyword is_anonymous_accessible: A value indicating if the resource can be accessed without
authorization.
:type is_anonymous_accessible: bool
:keyword lock_duration: ISO 8601 timespan duration of a peek-lock; that is, the amount of time
that the message is locked for other receivers. The maximum value for LockDuration is 5
minutes; the default value is 1 minute.
Expand All @@ -223,8 +220,6 @@ async def create_queue(self, name: str, **kwargs) -> QueueProperties:
:keyword user_metadata: Custom metdata that user can associate with the description. Max length
is 1024 chars.
:type user_metadata: str
:keyword support_ordering: A value that indicates whether the queue supports ordering.
:type support_ordering: bool
:keyword forward_dead_lettered_messages_to: The name of the recipient entity to which all the
dead-lettered messages of this subscription are forwarded to.
:type forward_dead_lettered_messages_to: str
Expand All @@ -242,14 +237,12 @@ async def create_queue(self, name: str, **kwargs) -> QueueProperties:
enable_batched_operations=kwargs.pop("enable_batched_operations", None),
enable_express=kwargs.pop("enable_express", None),
enable_partitioning=kwargs.pop("enable_partitioning", None),
is_anonymous_accessible=kwargs.pop("is_anonymous_accessible", None),
lock_duration=kwargs.pop("lock_duration", None),
max_delivery_count=kwargs.pop("max_delivery_count", None),
max_size_in_megabytes=kwargs.pop("max_size_in_megabytes", None),
requires_duplicate_detection=kwargs.pop("requires_duplicate_detection", None),
requires_session=kwargs.pop("requires_session", None),
status=kwargs.pop("status", None),
support_ordering=kwargs.pop("support_ordering", None),
forward_to=kwargs.pop("forward_to", None),
forward_dead_lettered_messages_to=kwargs.pop("forward_dead_lettered_messages_to", None),
user_metadata=kwargs.pop("user_metadata", None)
Expand Down Expand Up @@ -413,9 +406,6 @@ async def create_topic(self, name: str, **kwargs) -> TopicProperties:
:type size_in_bytes: int
:keyword filtering_messages_before_publishing: Filter messages before publishing.
:type filtering_messages_before_publishing: bool
:keyword is_anonymous_accessible: A value indicating if the resource can be accessed without
authorization.
:type is_anonymous_accessible: bool
:keyword authorization_rules: Authorization rules for resource.
:type authorization_rules:
list[~azure.servicebus.management.AuthorizationRule]
Expand All @@ -427,9 +417,6 @@ async def create_topic(self, name: str, **kwargs) -> TopicProperties:
:keyword enable_partitioning: A value that indicates whether the topic is to be partitioned
across multiple message brokers.
:type enable_partitioning: bool
:keyword enable_subscription_partitioning: A value that indicates whether the topic's
subscription is to be partitioned.
:type enable_subscription_partitioning: bool
:keyword enable_express: A value that indicates whether Express Entities are enabled. An express
queue holds a message in memory temporarily before writing it to persistent storage.
:type enable_express: bool
Expand All @@ -447,14 +434,12 @@ async def create_topic(self, name: str, **kwargs) -> TopicProperties:
duplicate_detection_history_time_window=kwargs.pop("duplicate_detection_history_time_window", None),
enable_batched_operations=kwargs.pop("enable_batched_operations", None),
size_in_bytes=kwargs.pop("size_in_bytes", None),
is_anonymous_accessible=kwargs.pop("is_anonymous_accessible", None),
authorization_rules=kwargs.pop("authorization_rules", None),
status=kwargs.pop("status", None),
support_ordering=kwargs.pop("support_ordering", None),
auto_delete_on_idle=kwargs.pop("auto_delete_on_idle", None),
enable_partitioning=kwargs.pop("enable_partitioning", None),
entity_availability_status=kwargs.pop("entity_availability_status", None),
enable_subscription_partitioning=kwargs.pop("enable_subscription_partitioning", None),
enable_express=kwargs.pop("enable_express", None),
user_metadata=kwargs.pop("user_metadata", None)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,6 @@ def create_queue(self, name, **kwargs):
:keyword enable_partitioning: A value that indicates whether the queue is to be partitioned
across multiple message brokers.
:type enable_partitioning: bool
:keyword is_anonymous_accessible: A value indicating if the resource can be accessed without
authorization.
:type is_anonymous_accessible: bool
:keyword lock_duration: ISO 8601 timespan duration of a peek-lock; that is, the amount of time
that the message is locked for other receivers. The maximum value for LockDuration is 5
minutes; the default value is 1 minute.
Expand All @@ -218,8 +215,6 @@ def create_queue(self, name, **kwargs):
:keyword user_metadata: Custom metdata that user can associate with the description. Max length
is 1024 chars.
:type user_metadata: str
:keyword support_ordering: A value that indicates whether the queue supports ordering.
:type support_ordering: bool
:keyword forward_dead_lettered_messages_to: The name of the recipient entity to which all the
dead-lettered messages of this subscription are forwarded to.
:type forward_dead_lettered_messages_to: str
Expand All @@ -237,14 +232,12 @@ def create_queue(self, name, **kwargs):
enable_batched_operations=kwargs.pop("enable_batched_operations", None),
enable_express=kwargs.pop("enable_express", None),
enable_partitioning=kwargs.pop("enable_partitioning", None),
is_anonymous_accessible=kwargs.pop("is_anonymous_accessible", None),
lock_duration=kwargs.pop("lock_duration", None),
max_delivery_count=kwargs.pop("max_delivery_count", None),
max_size_in_megabytes=kwargs.pop("max_size_in_megabytes", None),
requires_duplicate_detection=kwargs.pop("requires_duplicate_detection", None),
requires_session=kwargs.pop("requires_session", None),
status=kwargs.pop("status", None),
support_ordering=kwargs.pop("support_ordering", None),
forward_to=kwargs.pop("forward_to", None),
forward_dead_lettered_messages_to=kwargs.pop("forward_dead_lettered_messages_to", None),
user_metadata=kwargs.pop("user_metadata", None)
Expand Down Expand Up @@ -417,9 +410,6 @@ def create_topic(self, name, **kwargs):
:type size_in_bytes: int
:keyword filtering_messages_before_publishing: Filter messages before publishing.
:type filtering_messages_before_publishing: bool
:keyword is_anonymous_accessible: A value indicating if the resource can be accessed without
authorization.
:type is_anonymous_accessible: bool
:keyword authorization_rules: Authorization rules for resource.
:type authorization_rules:
list[~azure.servicebus.management.AuthorizationRule]
Expand All @@ -431,9 +421,6 @@ def create_topic(self, name, **kwargs):
:keyword enable_partitioning: A value that indicates whether the topic is to be partitioned
across multiple message brokers.
:type enable_partitioning: bool
:keyword enable_subscription_partitioning: A value that indicates whether the topic's
subscription is to be partitioned.
:type enable_subscription_partitioning: bool
:keyword enable_express: A value that indicates whether Express Entities are enabled. An express
queue holds a message in memory temporarily before writing it to persistent storage.
:type enable_express: bool
Expand All @@ -450,14 +437,12 @@ def create_topic(self, name, **kwargs):
duplicate_detection_history_time_window=kwargs.pop("duplicate_detection_history_time_window", None),
enable_batched_operations=kwargs.pop("enable_batched_operations", None),
size_in_bytes=kwargs.pop("size_in_bytes", None),
is_anonymous_accessible=kwargs.pop("is_anonymous_accessible", None),
authorization_rules=kwargs.pop("authorization_rules", None),
status=kwargs.pop("status", None),
support_ordering=kwargs.pop("support_ordering", None),
auto_delete_on_idle=kwargs.pop("auto_delete_on_idle", None),
enable_partitioning=kwargs.pop("enable_partitioning", None),
entity_availability_status=kwargs.pop("entity_availability_status", None),
enable_subscription_partitioning=kwargs.pop("enable_subscription_partitioning", None),
enable_express=kwargs.pop("enable_express", None),
user_metadata=kwargs.pop("user_metadata", None)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,6 @@ class QueueProperties(DictMixin): # pylint:disable=too-many-instance-attributes
:ivar enable_partitioning: A value that indicates whether the queue is to be partitioned
across multiple message brokers.
:type enable_partitioning: bool
:ivar is_anonymous_accessible: A value indicating if the resource can be accessed without
authorization.
:type is_anonymous_accessible: bool
:ivar lock_duration: ISO 8601 timespan duration of a peek-lock; that is, the amount of time
that the message is locked for other receivers. The maximum value for LockDuration is 5
minutes; the default value is 1 minute.
Expand All @@ -153,8 +150,6 @@ class QueueProperties(DictMixin): # pylint:disable=too-many-instance-attributes
:ivar user_metadata: Custom metdata that user can associate with the description. Max length
is 1024 chars.
:type user_metadata: str
:ivar support_ordering: A value that indicates whether the queue supports ordering.
:type support_ordering: bool
:ivar forward_dead_lettered_messages_to: The name of the recipient entity to which all the
dead-lettered messages of this subscription are forwarded to.
:type forward_dead_lettered_messages_to: str
Expand All @@ -181,14 +176,12 @@ def __init__(
self.enable_batched_operations = extract_kwarg('enable_batched_operations')
self.enable_express = extract_kwarg('enable_express')
self.enable_partitioning = extract_kwarg('enable_partitioning')
self.is_anonymous_accessible = extract_kwarg('is_anonymous_accessible')
self.lock_duration = extract_kwarg('lock_duration')
self.max_delivery_count = extract_kwarg('max_delivery_count')
self.max_size_in_megabytes = extract_kwarg('max_size_in_megabytes')
self.requires_duplicate_detection = extract_kwarg('requires_duplicate_detection')
self.requires_session = extract_kwarg('requires_session')
self.status = extract_kwarg('status')
self.support_ordering = extract_kwarg('support_ordering')
self.forward_to = extract_kwarg('forward_to')
self.user_metadata = extract_kwarg('user_metadata')
self.forward_dead_lettered_messages_to = extract_kwarg('forward_dead_lettered_messages_to')
Expand All @@ -210,14 +203,12 @@ def _from_internal_entity(cls, name, internal_qd):
enable_batched_operations=internal_qd.enable_batched_operations,
enable_express=internal_qd.enable_express,
enable_partitioning=internal_qd.enable_partitioning,
is_anonymous_accessible=internal_qd.is_anonymous_accessible,
lock_duration=internal_qd.lock_duration,
max_delivery_count=internal_qd.max_delivery_count,
max_size_in_megabytes=internal_qd.max_size_in_megabytes,
requires_duplicate_detection=internal_qd.requires_duplicate_detection,
requires_session=internal_qd.requires_session,
status=internal_qd.status,
support_ordering=internal_qd.support_ordering,
forward_to=internal_qd.forward_to,
forward_dead_lettered_messages_to=internal_qd.forward_dead_lettered_messages_to,
user_metadata=internal_qd.user_metadata
Expand All @@ -239,14 +230,12 @@ def _to_internal_entity(self):
self._internal_qd.enable_batched_operations = self.enable_batched_operations
self._internal_qd.enable_express = self.enable_express
self._internal_qd.enable_partitioning = self.enable_partitioning
self._internal_qd.is_anonymous_accessible = self.is_anonymous_accessible
self._internal_qd.lock_duration = self.lock_duration
self._internal_qd.max_delivery_count = self.max_delivery_count
self._internal_qd.max_size_in_megabytes = self.max_size_in_megabytes
self._internal_qd.requires_duplicate_detection = self.requires_duplicate_detection
self._internal_qd.requires_session = self.requires_session
self._internal_qd.status = self.status
self._internal_qd.support_ordering = self.support_ordering
self._internal_qd.forward_to = self.forward_to
self._internal_qd.forward_dead_lettered_messages_to = self.forward_dead_lettered_messages_to
self._internal_qd.user_metadata = self.user_metadata
Expand Down Expand Up @@ -386,9 +375,6 @@ class TopicProperties(DictMixin): # pylint:disable=too-many-instance-attributes
:type size_in_bytes: int
:ivar filtering_messages_before_publishing: Filter messages before publishing.
:type filtering_messages_before_publishing: bool
:ivar is_anonymous_accessible: A value indicating if the resource can be accessed without
authorization.
:type is_anonymous_accessible: bool
:ivar authorization_rules: Authorization rules for resource.
:type authorization_rules:
list[~azure.servicebus.management.AuthorizationRule]
Expand All @@ -407,9 +393,6 @@ class TopicProperties(DictMixin): # pylint:disable=too-many-instance-attributes
"Available", "Limited", "Renaming", "Restoring", "Unknown".
:type entity_availability_status: str or
~azure.servicebus.management.EntityAvailabilityStatus
:ivar enable_subscription_partitioning: A value that indicates whether the topic's
subscription is to be partitioned.
:type enable_subscription_partitioning: bool
:ivar enable_express: A value that indicates whether Express Entities are enabled. An express
queue holds a message in memory temporarily before writing it to persistent storage.
:type enable_express: bool
Expand All @@ -434,14 +417,12 @@ def __init__(
self.duplicate_detection_history_time_window = extract_kwarg('duplicate_detection_history_time_window')
self.enable_batched_operations = extract_kwarg('enable_batched_operations')
self.size_in_bytes = extract_kwarg('size_in_bytes')
self.is_anonymous_accessible = extract_kwarg('is_anonymous_accessible')
self.authorization_rules = extract_kwarg('authorization_rules')
self.status = extract_kwarg('status')
self.support_ordering = extract_kwarg('support_ordering')
self.auto_delete_on_idle = extract_kwarg('auto_delete_on_idle')
self.enable_partitioning = extract_kwarg('enable_partitioning')
self.entity_availability_status = extract_kwarg('entity_availability_status')
self.enable_subscription_partitioning = extract_kwarg('enable_subscription_partitioning')
self.enable_express = extract_kwarg('enable_express')
self.user_metadata = extract_kwarg('user_metadata')

Expand All @@ -458,14 +439,12 @@ def _from_internal_entity(cls, name, internal_td):
duplicate_detection_history_time_window=internal_td.duplicate_detection_history_time_window,
enable_batched_operations=internal_td.enable_batched_operations,
size_in_bytes=internal_td.size_in_bytes,
is_anonymous_accessible=internal_td.is_anonymous_accessible,
authorization_rules=internal_td.authorization_rules,
status=internal_td.status,
support_ordering=internal_td.support_ordering,
auto_delete_on_idle=internal_td.auto_delete_on_idle,
enable_partitioning=internal_td.enable_partitioning,
entity_availability_status=internal_td.entity_availability_status,
enable_subscription_partitioning=internal_td.enable_subscription_partitioning,
enable_express=internal_td.enable_express,
user_metadata=internal_td.user_metadata
)
Expand All @@ -482,14 +461,12 @@ def _to_internal_entity(self):
self._internal_td.duplicate_detection_history_time_window = self.duplicate_detection_history_time_window
self._internal_td.enable_batched_operations = self.enable_batched_operations
self._internal_td.size_in_bytes = self.size_in_bytes
self._internal_td.is_anonymous_accessible = self.is_anonymous_accessible
self._internal_td.authorization_rules = self.authorization_rules
self._internal_td.status = self.status
self._internal_td.support_ordering = self.support_ordering
self._internal_td.auto_delete_on_idle = self.auto_delete_on_idle
self._internal_td.enable_partitioning = self.enable_partitioning
self._internal_td.entity_availability_status = self.entity_availability_status
self._internal_td.enable_subscription_partitioning = self.enable_subscription_partitioning
self._internal_td.enable_express = self.enable_express
self._internal_td.user_metadata = self.user_metadata

Expand Down
Loading