Open ilawjr opened 3 years ago
Is the x-xmidt-transaction-uuid
value unique per message sent?
Talaria assumes this UUID is unique per message and device (ok to use the same UUID when sending a message to different devices).
Talked with @schmidtw and according to the wrp spec both source and uuid are required so we should return a 400 instead of accepting malformed wrps.
This relies on https://github.com/xmidt-org/wrp-go/issues/25 being fixed.
Including X-Xmidt-Transaction-Uuid and omitting the X-Xmidt-Source header in a direct request to Scytale can cause our simulators to timeout and and talaria to return a 504.
curl -X POST \ https://$scytaleurl:443/api/v2/device \ -H 'authorization: $auth' \ -H 'content-type: application/json' \ -H 'x-webpa-device-name: $testmac/config' \ -H 'x-xmidt-content-type: application/json' \ -H 'x-xmidt-message-type: 3' \ -H 'x-xmidt-transaction-uuid: postman-1234' \ -d ' {"command":"GET","names":["Device.DeviceInfo.X_CISCO_COM_FirmwareName"]}'
From side discussion with Joel, link map is in talaria.
Note: if you included X-Xmidt-Source, but omit X-Xmidt-Transaction-Uuid then you get a 200 return code, but an empty body. tldr; have the uuid and missing source -> 504 missing uuid and have source -> 200 (no body) have the uuid and have source -> 200 + body missing uuid and missing source - > 200 (no body)