Closed Anupamskd7 closed 1 year ago
Provisioning a device on the IoTAgent OPC UA with blank device_id gets registered.
Send a device provisioning request to the 4001 port of IoTAgent OPC UA with blank device_id as follows:
{ "devices": [ { "device_id": "", "entity_name": "urn:ngsi-ld:Device:age09_Car", "entity_type": "Device", "attributes": [ { "object_id": "ns=3;s=EngineBrake", "name": "EngineBrake", "type": "Number" }, { "object_id": "ns=3;s=Acceleration", "name": "Acceleration", "type": "Number" }, { "object_id": "ns=3;s=EngineStopped", "name": "EngineStopped", "type": "Boolean" } ]}]}
{"name":"MISSING_ATTRIBUTES","message":"The request was not well formed:Missing attributes: [\"device_id\"]"}
201 Created
{ "count": 1, "devices": [ { "device_id": "", "service": "openiot5", "service_path": "/demo", "entity_name": "urn:ngsi-ld:Device:age09_Car", "entity_type": "Device", "attributes": [ { "object_id": "ns=3;s=EngineBrake", "name": "EngineBrake", "type": "Number" }, { "object_id": "ns=3;s=Acceleration", "name": "Acceleration", "type": "Number" }, { "object_id": "ns=3;s=EngineStopped", "name": "EngineStopped", "type": "Boolean" } ], "lazy": [], "commands": [ { "object_id": "Error", "name": "Error", "type": "command" }, { "object_id": "Stop", "name": "Stop", "type": "command" }, { "object_id": "Accelerate", "name": "Accelerate", "type": "command" } ], "static_attributes": [] } ] }
IoTAgent OPC UA latest
OS: Centos 7 Env (Docker/K8s): Both Docker & K8S
Dear @Anupamskd7 , thanks for the detailed report, we will notify the problem to the underlying library on top of which iotagent-opcua is built. Best Regards
Description:
Provisioning a device on the IoTAgent OPC UA with blank device_id gets registered.
Steps to reproduce:
Send a device provisioning request to the 4001 port of IoTAgent OPC UA with blank device_id as follows:
Expected Output:
{"name":"MISSING_ATTRIBUTES","message":"The request was not well formed:Missing attributes: [\"device_id\"]"}
Actual Output:
201 Created
Devices GET Output:
Affected Product Version:
IoTAgent OPC UA latest
Environment details (with versions):
OS: Centos 7 Env (Docker/K8s): Both Docker & K8S