edgexfoundry / device-usb-camera

Owner: Device WG
Apache License 2.0
12 stars 28 forks source link

Config variable Path changed to Paths to support real sense cameras #278

Closed presatish closed 1 year ago

presatish commented 1 year ago

šŸž Bug Report

Affected Services [REQUIRED]

device-usb-camera

Is this a regression?

No

Description and Minimal Reproduction [REQUIRED]

After starting all the core services and the usb service when the usb device is manually added using Path instead of Paths this issue is seen.

šŸ”„ Exception or Error


curl -X POST -H 'Content-Type: application/json'  \
http://localhost:59881/api/v3/device \
-d '[
    {
    "apiVersion" : "v3",
    "device": {
        "name": "Camera001",
        "serviceName": "device-usb-camera",
        "profileName": "USB-Camera-General",
        "description": "My test camera",
        "adminState": "UNLOCKED",
        "operatingState": "UP",
        "protocols": {
            "USB": {
            "CardName": "UVC Camera (012d:0678)",
            "SerialNumber": "71C0AE6","
            "Path": "/dev/video0",
            "AutoStreaming": "false"
            }
        }
    }
    }
]'

[{"apiVersion":"v3","message":"Device Camera001 validation failed: property Paths of protocol USB is missing. Please check device configuration","statusCode":500}]

šŸŒ Your Environment

Deployment Environment: Docker, Docker + Dev Hybrid

EdgeX Version [REQUIRED]: main

Anything else relevant? Path Deprecated info needs to be added in the code and docs. For now the code has to support both Path and Paths to avoid breaking change until the next release.