-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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] Rename entity_availability_status
to availability_status
#13629
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,9 +112,9 @@ class QueueProperties(DictMixin): # pylint:disable=too-many-instance-attributes | |
:ivar duplicate_detection_history_time_window: ISO 8601 timeSpan structure that defines the | ||
duration of the duplicate detection history. The default value is 10 minutes. | ||
:type duplicate_detection_history_time_window: ~datetime.timedelta | ||
:ivar entity_availability_status: Availibility status of the entity. Possible values include: | ||
:ivar availability_status: Availibility status of the entity. Possible values include: | ||
"Available", "Limited", "Renaming", "Restoring", "Unknown". | ||
:type entity_availability_status: str or | ||
:type availability_status: str or | ||
~azure.servicebus.management.EntityAvailabilityStatus | ||
:ivar enable_batched_operations: Value that indicates whether server-side batched operations | ||
are enabled. | ||
|
@@ -172,7 +172,7 @@ def __init__( | |
self.dead_lettering_on_message_expiration = extract_kwarg('dead_lettering_on_message_expiration') | ||
self.default_message_time_to_live = extract_kwarg('default_message_time_to_live') | ||
self.duplicate_detection_history_time_window = extract_kwarg('duplicate_detection_history_time_window') | ||
self.entity_availability_status = extract_kwarg('entity_availability_status') | ||
self.availability_status = extract_kwarg('availability_status') | ||
self.enable_batched_operations = extract_kwarg('enable_batched_operations') | ||
self.enable_express = extract_kwarg('enable_express') | ||
self.enable_partitioning = extract_kwarg('enable_partitioning') | ||
|
@@ -199,7 +199,7 @@ def _from_internal_entity(cls, name, internal_qd): | |
dead_lettering_on_message_expiration=internal_qd.dead_lettering_on_message_expiration, | ||
default_message_time_to_live=internal_qd.default_message_time_to_live, | ||
duplicate_detection_history_time_window=internal_qd.duplicate_detection_history_time_window, | ||
entity_availability_status=internal_qd.entity_availability_status, | ||
availability_status=internal_qd.entity_availability_status, | ||
enable_batched_operations=internal_qd.enable_batched_operations, | ||
enable_express=internal_qd.enable_express, | ||
enable_partitioning=internal_qd.enable_partitioning, | ||
|
@@ -226,7 +226,7 @@ def _to_internal_entity(self): | |
self._internal_qd.dead_lettering_on_message_expiration = self.dead_lettering_on_message_expiration | ||
self._internal_qd.default_message_time_to_live = self.default_message_time_to_live | ||
self._internal_qd.duplicate_detection_history_time_window = self.duplicate_detection_history_time_window | ||
self._internal_qd.entity_availability_status = self.entity_availability_status | ||
self._internal_qd.entity_availability_status = self.availability_status | ||
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 | ||
|
@@ -389,9 +389,9 @@ class TopicProperties(DictMixin): # pylint:disable=too-many-instance-attributes | |
:ivar enable_partitioning: A value that indicates whether the topic is to be partitioned | ||
across multiple message brokers. | ||
:type enable_partitioning: bool | ||
:ivar entity_availability_status: Availability status of the entity. Possible values include: | ||
:ivar availability_status: Availability status of the entity. Possible values include: | ||
"Available", "Limited", "Renaming", "Restoring", "Unknown". | ||
:type entity_availability_status: str or | ||
:type availability_status: str or | ||
~azure.servicebus.management.EntityAvailabilityStatus | ||
: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. | ||
|
@@ -422,7 +422,7 @@ def __init__( | |
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.availability_status = extract_kwarg('availability_status') | ||
self.enable_express = extract_kwarg('enable_express') | ||
self.user_metadata = extract_kwarg('user_metadata') | ||
|
||
|
@@ -444,7 +444,7 @@ def _from_internal_entity(cls, name, internal_td): | |
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, | ||
availability_status=internal_td.entity_availability_status, | ||
enable_express=internal_td.enable_express, | ||
user_metadata=internal_td.user_metadata | ||
) | ||
|
@@ -466,7 +466,7 @@ def _to_internal_entity(self): | |
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.entity_availability_status = self.availability_status | ||
self._internal_td.enable_express = self.enable_express | ||
self._internal_td.user_metadata = self.user_metadata | ||
|
||
|
@@ -591,9 +591,9 @@ class SubscriptionProperties(DictMixin): # pylint:disable=too-many-instance-att | |
:ivar auto_delete_on_idle: ISO 8601 timeSpan idle interval after which the subscription is | ||
automatically deleted. The minimum duration is 5 minutes. | ||
:type auto_delete_on_idle: ~datetime.timedelta | ||
:ivar entity_availability_status: Availability status of the entity. Possible values include: | ||
:ivar availability_status: Availability status of the entity. Possible values include: | ||
"Available", "Limited", "Renaming", "Restoring", "Unknown". | ||
:type entity_availability_status: str or | ||
:type availability_status: str or | ||
~azure.servicebus.management.EntityAvailabilityStatus | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shall we consider renaming There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I considered that, and was wondering if you or others would mention as well. My reason for leaning towards no was that in isolation AvailabilityStatus seemed imprecise, and the added term narrowed its use such that, for being located in a somewhat generic module path, it'd be more clear what it's intended for. Let me know what you think; I'll also cc @lmazuel to get a fresh pair of eyes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a fair point. just being over paranoid here: is the naming There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now I'm paranoid because I can't find it in the apiviews for either .net or java, but I have the issue here as well where it's noted that we're keeping it with the shortened name. I've reached out to folks to try and see what the status is. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So it's good we synced on this, there were some deltas. Java didn't know they needed this because .net didn't have it in their apiview, as it was pending for them, so we're ahead of the pack. Given this, I'm going to leave with my proposal for the time being and see if anyone flags it/we can have a proper design discussion where I can voice what I shared with you above. More than happy to go either way if we do it intentionally. LMK how this sounds to you. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Personally I don't mind both, I let you decide. |
||
""" | ||
def __init__(self, name, **kwargs): | ||
|
@@ -617,7 +617,7 @@ def __init__(self, name, **kwargs): | |
self.user_metadata = extract_kwarg('user_metadata') | ||
self.forward_dead_lettered_messages_to = extract_kwarg('forward_dead_lettered_messages_to') | ||
self.auto_delete_on_idle = extract_kwarg('auto_delete_on_idle') | ||
self.entity_availability_status = extract_kwarg('entity_availability_status') | ||
self.availability_status = extract_kwarg('availability_status') | ||
|
||
validate_extraction_missing_args(extraction_missing_args) | ||
|
||
|
@@ -639,7 +639,7 @@ def _from_internal_entity(cls, name, internal_subscription): | |
user_metadata=internal_subscription.user_metadata, | ||
forward_dead_lettered_messages_to=internal_subscription.forward_dead_lettered_messages_to, | ||
auto_delete_on_idle=internal_subscription.auto_delete_on_idle, | ||
entity_availability_status=internal_subscription.entity_availability_status | ||
availability_status=internal_subscription.entity_availability_status | ||
) | ||
subscription._internal_sd = deepcopy(internal_subscription) | ||
return subscription | ||
|
@@ -661,7 +661,7 @@ def _to_internal_entity(self): | |
self._internal_sd.user_metadata = self.user_metadata | ||
self._internal_sd.forward_dead_lettered_messages_to = self.forward_dead_lettered_messages_to | ||
self._internal_sd.auto_delete_on_idle = self.auto_delete_on_idle | ||
self._internal_sd.entity_availability_status = self.entity_availability_status | ||
self._internal_sd.entity_availability_status = self.availability_status | ||
|
||
return self._internal_sd | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for confirmation: it's not a settable property (from the perspective of sdk client) on the entity? -- it's something the service side controls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct++
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KieranBrantnerMagee so it means the kwargs pop was a mistake? I was ignored before? Was creating an error? What happened?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Mistake" isn't the word I'd use. It should not be settable; it's effectively a read-only setting although it's theoretically exposed on the parameters that can be passed to create. (If this is what you're getting at, it does beg the question of whether it should be addressed in swagger; I made some assumptions that I might have to reassess if you would think it would)
As a note: don't want to cut off this discussion since I know you're off for the day and we'll be checking this in for code-complete, so feel free to ping async tomorrow.