ditrit / OGrEE-CLI

CLI for OGrEE
Mozilla Public License 2.0
3 stars 0 forks source link

object created even if using a non existing template #139

Closed hchybz closed 1 year ago

hchybz commented 1 year ago
toto@OGrEE3D:/Physical$> +dv:DEMO.HITACHI.BD.RO.R02.hdu000@1@non-existing-template@front
successfully created object
Received from Unity : 1 object(s) created
toto@OGrEE3D:/Physical$> get DEMO.HITACHI.BD.RO.R02.hdu000
{
    "attributes": {
        "height": "5",
        "heightUnit": "mm",
        "orientation": "front",
        "posU": "1",
        "size": "{\"x\":6,\"y\":12}",
        "sizeU": "non-existing-template",
        "sizeUnit": "mm",
        "slot": "",
        "template": ""
    },
    "category": "device",
    "createdDate": "2023-01-19T17:32:29.713Z",
    "description": [],
    "domain": "DEMO",
    "id": "63c97ead64dbc6fdd410c482",
    "lastUpdated": "2023-01-19T17:32:29.713Z",
    "name": "hdu000",
    "parentId": "63c97a0264dbc6fdd410c47e"
}

template does not exist : i should get an error. DO NOT CREATE a STUB/PLACEHOLDER object

denizul commented 1 year ago

Creating rooms,racks and devices have helpful descriptive error messages and no longer allow object creation on invalid arguments. The CLI will also distinguish errors received from the API via a string 'Response from API' prepended to the output