-
Notifications
You must be signed in to change notification settings - Fork 55
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
Simplify c8y_api::smartrest::topic module avoiding all redundant code to create topics #2316
Comments
There also seems to be an important difference in behaviour between
EDIT: There seem to be some checks specifically for nested child devices (58b1ebb), in which case perhaps there's no problems but it's still a bit confusing why using a "wrong" smartrest publish topic is fine. |
Is your refactoring request related to a problem? Please describe.
The
c8y_api::smartrest::topic
has various mechanisms to generate SmartREST topics for the main device, immediate child device, nested child devices and services. The recently introducedpublish_topic_from_ancestors
API already covers most of these cases and the rest are just redundant, especially the ones likeC8yTopic::ChildSmartRestResponse
, dedicated for immediate child devices only.Describe the solution you'd like
Refactor the
c8y_api::smartrest::topic
module with a smaller set of helper functions to create topics for all kinds of targets: the main device, immediate child device, nested child devices and services.The text was updated successfully, but these errors were encountered: