telefonicaid / iotagent-ul

IoT Agent for a UltraLight 2.0 based protocol (with HTTP, MQTT and AMQP transports)
https://fiware-iotagent-ul.rtfd.io/
GNU Affero General Public License v3.0
37 stars 55 forks source link

do not propage config flags from group to unprovisioned device #616

Closed AlvaroVega closed 1 year ago

AlvaroVega commented 1 year ago

related https://github.com/telefonicaid/iotagent-node-lib/pull/1391

fgalan commented 1 year ago

Maybe we should tell in someplace in the documentation how this works. I mean, something like this:

In the case of autoprovisioned devices, the associated document created in database doesn't include config group parameters (timestamp and explicitAttrs in particular). That way, these parameters can freely established modifying the device information after creation using the provisioning API. However, note that if a device (autoprovisioned or not) doesn't have these parameters defined at device level in database, the parameters are inherit from config group parameters.

Not sure where to include such fragment. Do we have some place in which autoprovisioned devices are explained? @mapedraza what do you think?

mapedraza commented 1 year ago

Maybe we should tell in someplace in the documentation how this works. I mean, something like this:

In the case of autoprovisioned devices, the associated document created in database doesn't include config group parameters (timestamp and explicitAttrs in particular). That way, these parameters can freely established modifying the device information after creation using the provisioning API. However, note that if a device (autoprovisioned or not) doesn't have these parameters defined at device level in database, the parameters are inherit from config group parameters.

Not sure where to include such fragment. Do we have some place in which autoprovisioned devices are explained? @mapedraza what do you think?

I agree, it seems reasonable. Maybe a new chapter explaining autoprovision under https://github.com/telefonicaid/iotagent-node-lib/blob/master/doc/api.md#iot-agent-information-model

fgalan commented 1 year ago

Maybe we should tell in someplace in the documentation how this works. I mean, something like this:

In the case of autoprovisioned devices, the associated document created in database doesn't include config group parameters (timestamp and explicitAttrs in particular). That way, these parameters can freely established modifying the device information after creation using the provisioning API. However, note that if a device (autoprovisioned or not) doesn't have these parameters defined at device level in database, the parameters are inherit from config group parameters.

Not sure where to include such fragment. Do we have some place in which autoprovisioned devices are explained? @mapedraza what do you think?

I agree, it seems reasonable. Maybe a new chapter explaining autoprovision under https://github.com/telefonicaid/iotagent-node-lib/blob/master/doc/api.md#iot-agent-information-model

Could you add such documentation to PR https://github.com/telefonicaid/iotagent-node-lib/pull/1391, pls?

mapedraza commented 1 year ago

Could you add such documentation to PR telefonicaid/iotagent-node-lib#1391, pls?

Yes, I opened an issue but I will add to that PR

fgalan commented 1 year ago

Could you add such documentation to PR telefonicaid/iotagent-node-lib#1391, pls?

Yes, I opened an issue but I will add to that PR

Taking into account the modification to the documentation is mall, I'd suggest in the PR we have now on the table (ideally, we should should include code + test + doc in the same PR, only when this cannot be done we use "debt" issues).

I have found another section that can be relevant: https://github.com/telefonicaid/iotagent-node-lib/blob/master/doc/api.md#autoprovision-configuration-autoprovision

mapedraza commented 1 year ago

Could you add such documentation to PR telefonicaid/iotagent-node-lib#1391, pls?

Yes, I opened an issue but I will add to that PR

Taking into account the modification to the documentation is mall, I'd suggest in the PR we have now on the table (ideally, we should should include code + test + doc in the same PR, only when this cannot be done we use "debt" issues).

I have found another section that can be relevant: https://github.com/telefonicaid/iotagent-node-lib/blob/master/doc/api.md#autoprovision-configuration-autoprovision

Done here: https://github.com/telefonicaid/iotagent-node-lib/pull/1391/commits/64f4ba31544fc48de7ad11d7eb373ec8e9f81735