diff options
Diffstat (limited to 'vpp-api/lua/examples')
-rw-r--r-- | vpp-api/lua/examples/cli/lua-cli.lua | 10 | ||||
-rw-r--r-- | vpp-api/lua/examples/example-classifier.lua | 6 | ||||
-rw-r--r-- | vpp-api/lua/examples/example-cli.lua | 5 |
3 files changed, 11 insertions, 10 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") diff --git a/vpp-api/lua/examples/example-classifier.lua b/vpp-api/lua/examples/example-classifier.lua index a3fa45f2719..ec9c3d3e020 100644 --- a/vpp-api/lua/examples/example-classifier.lua +++ b/vpp-api/lua/examples/example-classifier.lua @@ -20,12 +20,12 @@ local vpp = require "vpp-lapi" local bit = require("bit") root_dir = "/home/ubuntu/vpp" -pneum_path = root_dir .. "/build-root/install-vpp_debug-native/vpp-api/lib64/libpneum.so" +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:json_api(root_dir .. "/build-root/install-vpp_lite_debug-native/vpp/vpp-api/vpe.api.json") vpp:connect("aytest") diff --git a/vpp-api/lua/examples/example-cli.lua b/vpp-api/lua/examples/example-cli.lua index 656feae5cbc..8b84989f1f6 100644 --- a/vpp-api/lua/examples/example-cli.lua +++ b/vpp-api/lua/examples/example-cli.lua @@ -18,12 +18,11 @@ vpp = require "vpp-lapi" root_dir = "/home/ubuntu/vpp" -pneum_path = root_dir .. "/build-root/install-vpp_debug-native/vpp-api/lib64/libpneum.so" +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:json_api(root_dir .. "/build-root/install-vpp_lite_debug-native/vpp/vpp-api/vpe.api.json") vpp:connect("aytest") |