summaryrefslogtreecommitdiffstats
path: root/vpp-api/lua/examples/cli
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2016-12-08 14:03:55 +0000
committerDamjan Marion <dmarion.lists@gmail.com>2016-12-08 17:15:18 +0000
commitb868e4ea385544c96c26972e4f055bf3c6324449 (patch)
treea3fb2c6b7f929520339eab6677d29bbb4da71c3d /vpp-api/lua/examples/cli
parent6162e1e26b2eaffd2def3be472648aee181c596e (diff)
Adapt LuaJIT VPP library and a few examples to API with per-message CRC and JSON
Change-Id: Ibb886e418d338588e61c7bb6cb57f2093c7c5062 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Diffstat (limited to 'vpp-api/lua/examples/cli')
-rw-r--r--vpp-api/lua/examples/cli/lua-cli.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/vpp-api/lua/examples/cli/lua-cli.lua b/vpp-api/lua/examples/cli/lua-cli.lua
index 1ad5045730e..b3a24d7d0ef 100644
--- a/vpp-api/lua/examples/cli/lua-cli.lua
+++ b/vpp-api/lua/examples/cli/lua-cli.lua
@@ -557,12 +557,14 @@ end
function init_vpp(vpp)
local root_dir = "/home/ubuntu/vpp"
- local pneum_path = root_dir .. "/build-root/install-vpp_debug-native/vpp-api/lib64/libpneum.so"
+ local pneum_path = root_dir .. "/build-root/install-vpp_lite_debug-native/vpp-api/lib64/libpneum.so"
vpp:init({ pneum_path = pneum_path })
- vpp:consume_api(root_dir .. "/build-root/install-vpp_debug-native/vlib-api/vlibmemory/memclnt.api")
- vpp:consume_api(root_dir .. "/build-root/install-vpp_debug-native/vpp/vpp-api/vpe.api")
+ vpp:init({ pneum_path = pneum_path })
+ vpp:json_api(root_dir .. "/build-root/install-vpp_lite_debug-native/vpp/vpp-api/vpe.api.json")
+
+
vpp:connect("lua_cli")
end
@@ -652,7 +654,7 @@ for linenum, line in ipairs(vpp_clis) do
-- print(line, ret)
end
-for msgnum, msgname in ipairs(vpp.msg_number_to_name) do
+for msgnum, msgname in pairs(vpp.msg_number_to_name) do
local cli, numspaces = string.gsub(msgname, "_", " ")
device.output["call " .. cli .. " " .. dotdotdot] = function(rl)
print("ARGH")