-
Notifications
You must be signed in to change notification settings - Fork 160
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
Generic request batch job #4065
Comments
what about the "command execute" step for device jobs? |
Considering Kura implementation, the command request is intended to run shell commands on the gateway, not execute a method on Kura itself. Even in a third party MQTT client, which we have used, the command request is very limited in the arguments in comparison to generic request, where you can send even files if coded properly. We have created some customized remote requests for an advanced management of the device which is a very powerful feature in Kura. However, without the possibility to execute such requests through batch jobs, the customization is partially invalidated as many of our devices connect to Kapua only from time to time, in order to save battery. Additionally, the generic request would allow to support all current and future available requests in Kura, even if Kapua has not yet implemented those requests or the company is taking some time to update the platform. It seems like a good compatibility tool anyways. |
I think to have understood what you are saying. Let me clarify: you are asking to implement a way to send commands to kura for the ALL the possible methods/app that kura can support and not just the subset now present in the drop-down menu. The "command execute", in this context, is just one of those methods |
@pintify can you provide me an example XML of a request that you would like to send with the hypothetical job we are talking about? basically one that could be executed via /{scopeId}/devices/{deviceId}/requests API request. For example, the one example provided in the swagger doc. but with XML format (check that can be executed smoothly). I think I will be able to implement the feature and I need this XML to do some tests |
Well I'm not sure on how to do it. It greatly depends on how the rest of the job service is built. Some options I'd propose are:
The first one has the advantage of being more compact. The second one feels a bit more aligned with the rest of the batch jobs so I think it will be easier to implement and probably also easier to use both in the web and the API REST (via the call POST But again, it depends on how the job service is built. I've checked the source but it's too complex for me to be certain. |
I think to have understood the general logic behind jobs-api and maybe its just a work of conecting the present logic wiht a custom jbatch *processor.java for the "genericReauest" for device management calling the appropriate DeviceRequestManagementService. I'll work on it when possible |
That's great, thank you very much @Agnul97 ! |
Is your feature request related to a problem? Please describe.
The batch job feature is one of the most powerful but the collection of tasks available are very short and any given user can deploy their own additions. I think that implementing the generic request, available already via API REST, in the batch job would be very useful.
The text was updated successfully, but these errors were encountered: