diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2018-06-29 19:42:56 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2018-07-10 17:12:14 +0200 |
commit | dc63d731f884da11cb0fc2d3b98eef5e2c2c07bc (patch) | |
tree | 09b095334b9e0b57574e8d31df033c61ed53c735 /conf.d/project/etc/aft-mapis.json | |
parent | 06e96704868d7b13c1e8e296ce1b262069ca9b4a (diff) |
First draft for mock apis
An m(ock)api is a plugin with its action as verb. About
now the event listener is the same then the main api
Change-Id: Iadbbb60cfbe9d5ef85801c346e6565ccde92b0c4
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'conf.d/project/etc/aft-mapis.json')
-rw-r--r-- | conf.d/project/etc/aft-mapis.json | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/conf.d/project/etc/aft-mapis.json b/conf.d/project/etc/aft-mapis.json new file mode 100644 index 0000000..4ecfbbb --- /dev/null +++ b/conf.d/project/etc/aft-mapis.json @@ -0,0 +1,59 @@ +{ + "id": "http://iot.bzh/download/public/schema/json/ctl-schema.json#", + "$schema": "http://iot.bzh/download/public/schema/json/ctl-schema.json#", + "metadata": { + "uid": "Test", + "version": "1.0", + "api": "test", + "info": "Configuration to test an emulated api", + "require": [ + "low-can" + ] + }, + "onload": { + "uid": "launch_all_tests", + "info": "Launch all the tests", + "action": "lua://AFT#_launch_test", + "args": { + "trace": "low-can", + "files": "mapi_tests.lua" + } + }, + "mapis": [{ + "uid": "low-can", + "info": "Faked low-can API", + "libs": "mapi_low-can.lua", + "verbs": [ + { + "uid": "subscribe", + "info": "Subscribe to CAN signals events", + "action": "lua://low-can#_subscribe" + }, + { + "uid": "unsubscribe", + "info": "Unsubscribe previously suscribed signals.", + "action": "lua://low-can#_unsubscribe" + }, + { + "uid": "get", + "info": "get a current value of CAN message", + "action": "lua://low-can#_get" + }, + { + "uid": "list", + "info": "get a supported CAN message list", + "action": "lua://low-can#_list" + }, + { + "uid": "auth", + "info": "Authenticate session to be raise Level Of Assurance.", + "action": "lua://low-can#_auth" + }, + { + "uid": "write", + "info": "Write a CAN messages to the CAN bus.", + "action": "lua://low-can#_write" + } + ] + }] +} |