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

Adds a method to the client to delete a subscriptions #1296

Merged
merged 1 commit into from
May 1, 2023
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
6 changes: 6 additions & 0 deletions asyncua/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,12 @@ def get_subscription_revised_params( # type: ignore
modified_params.RequestedLifetimeCount = results.RevisedLifetimeCount
return modified_params

async def delete_subscriptions(self, subscription_ids):
"""
Deletes the provided list of subscription_ids
"""
await self.uaclient.delete_subscriptions(subscription_ids)

def get_keepalive_count(self, period) -> int:
"""
We request the server to send a Keepalive notification when
Expand Down
4 changes: 4 additions & 0 deletions asyncua/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@ def create_subscription(self, period, handler):
aio_sub = self.tloop.post(coro)
return Subscription(self.tloop, aio_sub)

@syncmethod
def delete_subscriptions(self, subscription_ids):
pass

@syncmethod
def get_namespace_index(self, url):
pass
Expand Down