Implements RESTful API to get/add/edit/delete local network pools

This commit is contained in:
Simone Mainardi 2020-07-08 16:45:55 +02:00
parent 83e2b10953
commit 2a8b8335a2
4 changed files with 24 additions and 48 deletions

View file

@ -4,21 +4,9 @@
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
package.path = dirs.installdir .. "/scripts/lua/modules/pools/?.lua;" .. package.path
require "lua_utils"
local json = require "dkjson"
local rest_utils = require "rest_utils"
--
-- Delete an existing pool
--
sendHTTPHeader('application/json')
local rc = rest_utils.consts_ok
local res = {
-- STUB
}
print(rest_utils.rc(rc, res))
local local_network_pools = require "local_network_pools"
local pools_rest_utils = require "pools_rest_utils"
pools_rest_utils.delete_pool(local_network_pools)