Adds REST stubs for the addition of pools

Addresses #4140
This commit is contained in:
Simone Mainardi 2020-07-03 14:03:31 +02:00
parent 602f7c66ee
commit 78d2571e0f
4 changed files with 96 additions and 0 deletions

View file

@ -0,0 +1,24 @@
--
-- (C) 2013-20 - ntop.org
--
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
require "lua_utils"
local json = require "dkjson"
local rest_utils = require "rest_utils"
--
-- Add a new pool
--
sendHTTPHeader('application/json')
local rc = rest_utils.consts_ok
local res = {
pool_id = "abcdeficgejx01234" -- stub
}
print(rest_utils.rc(rc, res))