aboutsummaryrefslogtreecommitdiffstats
path: root/conf.d/controller
diff options
context:
space:
mode:
author8000ff <clementmallejac@gmail.com>2018-07-25 10:46:54 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-07-26 09:06:37 +0000
commit7137e2d9b14a380bc7da317db67213bcdbe66241 (patch)
tree8721dc6fda02aa2830146bdcc105df6336578e6c /conf.d/controller
parent99e5c662eb4c5819e082d955da963a6db21c0e0a (diff)
Added callVerb function
Very helpful for setup and/or teardown of a test scenario Change-Id: I068e779a6812bb89bc65646eda2c0271387513d0 Signed-off-by: 8000ff <clementmallejac@gmail.com>
Diffstat (limited to 'conf.d/controller')
-rw-r--r--conf.d/controller/lua.d/aft.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/conf.d/controller/lua.d/aft.lua b/conf.d/controller/lua.d/aft.lua
index 4d0fac7..b229e39 100644
--- a/conf.d/controller/lua.d/aft.lua
+++ b/conf.d/controller/lua.d/aft.lua
@@ -315,6 +315,10 @@ local function assertVerbCallParameters(src, api, verb, args)
_AFT.assertIsTable(args, "Arguments must use LUA Table (event empty)")
end
+function _AFT.callVerb(api, verb, args)
+ AFB:servsync(_AFT.context, api, verb, args)
+end
+
function _AFT.assertVerb(api, verb, args, cb)
assertVerbCallParameters(_AFT.context, api, verb, args)
local err,responseJ = AFB:servsync(_AFT.context, api, verb, args)