Skip to content

Support for VTN-to-VEN Reports - #174

Open
gthole wants to merge 6 commits into
OpenLEADR:mainfrom
gthole:vtn-reporting-hooks
Open

Support for VTN-to-VEN Reports#174
gthole wants to merge 6 commits into
OpenLEADR:mainfrom
gthole:vtn-reporting-hooks

Conversation

@gthole

Copy link
Copy Markdown

Allow clients to implement VTN-to-VEN reports with poll callback handlers.

Add callback handlers for oadrRegisterReport and oadrUpdateReport Poll messages.

Notes:

  • oadrRegisterReport will still return an oadrRegisteredReport with no requested reports as before, so there is no change to that behavior unless a VEN client adds a handler.
  • oadrUpdateReport previously would crash the client since it would attempt to call an _on_report method that does not exist on the Client class. Now it will return an oadrUpdatedReport to the VTN and call a handler.

Many thanks for this excellent project!

Signed-off-by: Greg Thole <gthole@gmail.com>
Signed-off-by: Greg Thole <gthole@gmail.com>
Signed-off-by: Greg Thole <gthole@gmail.com>

@axmsoftwareaxmsoftware left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Implements a missing feature

@axmsoftwareaxmsoftware left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Test failures need to be addressed before merge .See test-suite workflow for python 3.10

Included the new valid handlers in the testing, should consider adding test for each?
Signed-off-by: Mohammed Ali <mohammed.binbasri@gmail.com>
considered the case when it is empty and no key for 'reports' is there. I think migrating to pydantic would be better
Signed-off-by: Mohammed Ali <mohammed.binbasri@gmail.com>
Comment threadopenleadr/client.py
Comment threadopenleadr/client.py Outdated
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@gthole@axmsoftware@Binbasri-in