Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
2a2b28c
[EGv2] Build Release (#30325)
l0lawrence May 19, 2023
0cf20d1
link to samples
l0lawrence May 22, 2023
9f2feda
remove comment
l0lawrence May 22, 2023
626393c
remove uneeded test
l0lawrence May 22, 2023
0d92b59
[EGv2] doc updates (#30483)
l0lawrence May 22, 2023
4487000
[EGv2] Eg typing/formatting (#30492)
l0lawrence May 23, 2023
66cb39d
Beta LiveTests (#30728)
l0lawrence Aug 25, 2023
5ce8776
[EGv2] generate with newer emitter (#31962)
l0lawrence Oct 5, 2023
211d80f
[EGv2] Binary mode (#32922)
l0lawrence Nov 3, 2023
3129eb9
[EventGrid] Ignite Release generate with new typespec (#32652)
l0lawrence Nov 9, 2023
2808655
update for release
l0lawrence Nov 9, 2023
285d5f5
add changelog
l0lawrence Nov 9, 2023
0fff786
[EG] Regenerate beta (#35014)
l0lawrence Mar 29, 2024
9123ac0
[EG] Beta One Client (#34973)
l0lawrence Apr 8, 2024
c1e2e67
[EG] Docstring/update changelog (#35108)
l0lawrence Apr 9, 2024
f1cb640
update readme (#35147)
l0lawrence Apr 10, 2024
49d46d4
beta version
l0lawrence Apr 10, 2024
f48ab90
[EG] Readme updates (#35152)
l0lawrence Apr 11, 2024
47fc92e
type error to value error (#35164)
l0lawrence Apr 11, 2024
2950192
[EG] rename release_delay (#35172)
l0lawrence Apr 11, 2024
7ddd0e5
[EG] regenerate to fix gen code bug (#35327)
l0lawrence Apr 24, 2024
303fc88
ver (#35345)
l0lawrence Apr 24, 2024
ba8a71f
typo (#35348)
l0lawrence Apr 24, 2024
e6b05cb
typo (#35351)
l0lawrence Apr 24, 2024
6186af3
[EG] Archboard Feedback (#35738)
l0lawrence May 30, 2024
7181462
[EG] Update tests (#35833)
l0lawrence May 31, 2024
3b603cf
Merge branch 'main' into feature/eventgrid
l0lawrence May 31, 2024
66bafef
remove print (#35855)
l0lawrence May 31, 2024
6e4a87f
Merge branch 'main' into feature/eventgrid
l0lawrence May 31, 2024
6190bde
[EG] update pyproject and samples (#35857)
l0lawrence Jun 3, 2024
14bfdaf
update readme + version
l0lawrence Jun 3, 2024
bd91117
regen
l0lawrence Jun 3, 2024
6a821f3
Update scripts/devops_tasks/test_run_samples.py
l0lawrence Jun 3, 2024
9a80b90
readme
l0lawrence Jun 3, 2024
88e1a09
typo
l0lawrence Jun 3, 2024
3dd74c3
update
l0lawrence Jun 4, 2024
77abc56
add tests
l0lawrence Jun 4, 2024
1b85d9e
updates tests 2
l0lawrence Jun 4, 2024
1b9ed9b
Revert "updates tests 2"
l0lawrence Jun 4, 2024
06d4bef
try
l0lawrence Jun 4, 2024
e74d7b4
typeError
l0lawrence Jun 4, 2024
a56bf9e
missing await
l0lawrence Jun 4, 2024
1cd9f27
unused import
l0lawrence Jun 5, 2024
4909e83
test rbac (#35953)
l0lawrence Jun 6, 2024
eea5393
readme updates
l0lawrence Jun 7, 2024
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
Prev Previous commit
Next Next commit
update
  • Loading branch information
l0lawrence committed Jun 4, 2024
commit 3dd74c37ba557aaf19e1bf93db519f4ce33b35e1
Original file line number Diff line number Diff line change
Expand Up @@ -61,26 +61,6 @@
from cloudevents.http.event import CloudEvent as CNCFCloudEvent


def use_standard_only(func):
"""Use the standard client only.

This decorator raises an AttributeError if the client is not a standard client.

:param func: The function to decorate.
:type func: Callable
:return: The decorated function.
:rtype: Callable
"""

@wraps(func)
def wrapper(self, *args, **kwargs):
if self._level == "Basic": # pylint: disable=protected-access
raise ValueError("The basic client is not supported for this operation.")
return func(self, *args, **kwargs)

return wrapper


class EventGridPublisherClientOperationsMixin(PublisherOperationsMixin):

@distributed_trace
Expand All @@ -103,7 +83,8 @@ def send(
) -> None: # pylint: disable=docstring-should-be-keyword, docstring-missing-param
"""Send events to the Event Grid Service.

:param events: The event to send.
:param events: The event(s) to send. If sending to an Event Grid Namespace, the dict or list of dicts
should be in the format of a CloudEvent.
:type events: CloudEvent or List[CloudEvent] or Dict[str, Any] or List[Dict[str, Any]]
or CNCFCloudEvent or List[CNCFCloudEvent] or EventGridEvent or List[EventGridEvent]
:keyword channel_name: The name of the channel to send the event to. Event Grid Basic Resource only.
Expand Down Expand Up @@ -331,7 +312,7 @@ def _serialize_events(events):
return [_from_cncf_events(e) for e in events]
else:
# Does not conform to format, send as is
return json.dumps(events)
raise ValueError("Invalid event data. Please check the data is of Cloud Event format and try again.")


def _serialize_cloud_event(cloud_event):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ async def send(
) -> None: # pylint: disable=docstring-should-be-keyword, docstring-missing-param
"""Send events to the Event Grid Service.

:param events: The event to send.
:param events: The event(s) to send. If sending to an Event Grid Namespace, the dict or list of dicts
should be in the format of a CloudEvent.
:type events: CloudEvent or List[CloudEvent] or Dict[str, Any] or List[Dict[str, Any]]
or CNCFCloudEvent or List[CNCFCloudEvent] or EventGridEvent or List[EventGridEvent]
:keyword channel_name: The name of the channel to send the event to. Event Grid Basic Resource only.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
# license information.
# --------------------------------------------------------------------------
"""
FILE: sample_all_operations.py
FILE: sample_consume_process_events_async.py
DESCRIPTION:
These samples demonstrate sending, receiving, releasing, and acknowledging CloudEvents.
USAGE:
python sample_all_operations.py
python sample_consume_process_events_async.py
Set the environment variables with your own values before running the sample:
1) EVENTGRID_KEY - The access key of your eventgrid account.
2) EVENTGRID_ENDPOINT - The namespace endpoint. Typically it exists in the format
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
# license information.
# --------------------------------------------------------------------------
"""
FILE: sample_all_operations.py
FILE: sample_consume_process_events.py
DESCRIPTION:
These samples demonstrate sending, receiving, releasing, and acknowledging CloudEvents.
USAGE:
python sample_all_operations.py
python sample_consume_process_events.py
Set the environment variables with your own values before running the sample:
1) EVENTGRID_KEY - The access key of your eventgrid account.
2) EVENTGRID_ENDPOINT - The namespace endpoint. Typically it exists in the format
Expand Down Expand Up @@ -54,7 +54,6 @@
]
)


# Receive Published Cloud Events
try:
receive_results = client.receive(
Expand Down