Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
2 changes: 1 addition & 1 deletion sdk/eventgrid/azure-eventgrid/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release History

## 4.2.0 (2021-05-11)
## 4.2.0 (2021-05-12)

**New Features**
- Added new event names to the `SystemEventNames` enum.
Expand Down
89 changes: 45 additions & 44 deletions sdk/eventgrid/azure-eventgrid/azure/eventgrid/_event_mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,48 @@ class SystemEventNames(str, Enum):
Azure Event Grid. To check the list of recognizable system topics,
visit https://docs.microsoft.com/azure/event-grid/system-topics.
"""
# these names below are for backward compat only - refrain from using them.
AcsChatMemberAddedToThreadWithUserEventName = 'Microsoft.Communication.ChatMemberAddedToThreadWithUser'

ResourceWriteFailureEventName = 'Microsoft.Resources.ResourceWriteFailure'

IoTHubDeviceDeletedEventName = 'Microsoft.Devices.DeviceDeleted'

IoTHubDeviceDisconnectedEventName = 'Microsoft.Devices.DeviceDisconnected'

ResourceDeleteFailureEventName = 'Microsoft.Resources.ResourceDeleteFailure'

ResourceDeleteCancelEventName = 'Microsoft.Resources.ResourceDeleteCancel'

AcsChatThreadParticipantAddedEventName = 'Microsoft.Communication.ChatThreadParticipantAdded'

ResourceDeleteSuccessEventName = 'Microsoft.Resources.ResourceDeleteSuccess'

EventGridSubscriptionValidationEventName = 'Microsoft.EventGrid.SubscriptionValidationEvent'

ResourceWriteSuccessEventName = 'Microsoft.Resources.ResourceWriteSuccess'

ResourceActionSuccessEventName = 'Microsoft.Resources.ResourceActionSuccess'

ResourceWriteCancelEventName = 'Microsoft.Resources.ResourceWriteCancel'

ServiceBusDeadletterMessagesAvailableWithNoListenerEventName = 'Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListener'

ResourceActionFailureEventName = 'Microsoft.Resources.ResourceActionFailure'

AcsChatMemberRemovedFromThreadWithUserEventName = 'Microsoft.Communication.ChatMemberRemovedFromThreadWithUser'

IoTHubDeviceConnectedEventName = 'Microsoft.Devices.DeviceConnected'

EventGridSubscriptionDeletedEventName = 'Microsoft.EventGrid.SubscriptionDeletedEvent'

AcsChatThreadParticipantRemovedEventName = 'Microsoft.Communication.ChatThreadParticipantRemoved'

ResourceActionCancelEventName = 'Microsoft.Resources.ResourceActionCancel'

IoTHubDeviceCreatedEventName = 'Microsoft.Devices.DeviceCreated'

# backward compat names end here.
AcsChatMessageDeletedEventName = 'Microsoft.Communication.ChatMessageDeleted'

AcsChatMessageDeletedInThreadEventName = 'Microsoft.Communication.ChatMessageDeletedInThread'
Expand Down Expand Up @@ -98,7 +140,7 @@ class SystemEventNames(str, Enum):

KeyVaultSecretNewVersionCreatedEventName = 'Microsoft.KeyVault.SecretNewVersionCreated'

MachineLearningServicesNamesetDriftDetectedEventName = 'Microsoft.MachineLearningServices.DatasetDriftDetected'
MachineLearningServicesDatasetDriftDetectedEventName = 'Microsoft.MachineLearningServices.DatasetDriftDetected'

MachineLearningServicesModelDeployedEventName = 'Microsoft.MachineLearningServices.ModelDeployed'

Expand Down Expand Up @@ -150,11 +192,11 @@ class SystemEventNames(str, Enum):

MediaLiveEventEncoderDisconnectedEventName = 'Microsoft.Media.LiveEventEncoderDisconnected'

MediaLiveEventIncomingNameChunkDroppedEventName = 'Microsoft.Media.LiveEventIncomingDataChunkDropped'
MediaLiveEventIncomingDataChunkDroppedEventName = 'Microsoft.Media.LiveEventIncomingDataChunkDropped'

MediaLiveEventIncomingStreamReceivedEventName = 'Microsoft.Media.LiveEventIncomingStreamReceived'

MediaLiveEventIncomingStreamsOutOfSyncEventName = 'Microsoft.Media.LiveEventIncomingStreamsOutOfSync'
MediaLiveEventIncomingStreamsOutOfSyncEventName = 'Microsoft.Media.LiveEventIncomingStreamsOutOfSync'

MediaLiveEventIncomingVideoStreamsOutOfSyncEventName = 'Microsoft.Media.LiveEventIncomingVideoStreamsOutOfSync'

Expand Down Expand Up @@ -253,44 +295,3 @@ class SystemEventNames(str, Enum):
WebSlotSwapWithPreviewCancelledEventName = 'Microsoft.Web.SlotSwapWithPreviewCancelled'

WebSlotSwapWithPreviewStartedEventName = 'Microsoft.Web.SlotSwapWithPreviewStarted'

# these names below are for backward compat only - refrain from using them.
AcsChatMemberAddedToThreadWithUserEventName = 'Microsoft.Communication.ChatMemberAddedToThreadWithUser'

ResourceWriteFailureEventName = 'Microsoft.Resources.ResourceWriteFailure'

IoTHubDeviceDeletedEventName = 'Microsoft.Devices.DeviceDeleted'

IoTHubDeviceDisconnectedEventName = 'Microsoft.Devices.DeviceDisconnected'

ResourceDeleteFailureEventName = 'Microsoft.Resources.ResourceDeleteFailure'

ResourceDeleteCancelEventName = 'Microsoft.Resources.ResourceDeleteCancel'

AcsChatThreadParticipantAddedEventName = 'Microsoft.Communication.ChatThreadParticipantAdded'

ResourceDeleteSuccessEventName = 'Microsoft.Resources.ResourceDeleteSuccess'

EventGridSubscriptionValidationEventName = 'Microsoft.EventGrid.SubscriptionValidationEvent'

ResourceWriteSuccessEventName = 'Microsoft.Resources.ResourceWriteSuccess'

ResourceActionSuccessEventName = 'Microsoft.Resources.ResourceActionSuccess'

ResourceWriteCancelEventName = 'Microsoft.Resources.ResourceWriteCancel'

ServiceBusDeadletterMessagesAvailableWithNoListenerEventName = 'Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListener'

ResourceActionFailureEventName = 'Microsoft.Resources.ResourceActionFailure'

AcsChatMemberRemovedFromThreadWithUserEventName = 'Microsoft.Communication.ChatMemberRemovedFromThreadWithUser'

IoTHubDeviceConnectedEventName = 'Microsoft.Devices.DeviceConnected'

EventGridSubscriptionDeletedEventName = 'Microsoft.EventGrid.SubscriptionDeletedEvent'

AcsChatThreadParticipantRemovedEventName = 'Microsoft.Communication.ChatThreadParticipantRemoved'

ResourceActionCancelEventName = 'Microsoft.Resources.ResourceActionCancel'

IoTHubDeviceCreatedEventName = 'Microsoft.Devices.DeviceCreated'
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ def event_tuples(system_events):
return tup_list

def generate_enum_content(tuples):
for tup in tup_list:
print(tup[0] + " = '" + tup[1] + "'\n")
print("# these names below are for backward compat only - refrain from using them.")
for k, v in backward_compat.items():
print(k + " = '" + v + "'\n")

print("# backward compat names end here.")
for tup in tup_list:
print(tup[0] + " = '" + tup[1] + "'\n")
system_events = [m for m in inspect.getmembers(models) if m[0].endswith('Data')]
tup_list = event_tuples(system_events)

Expand Down