summaryrefslogtreecommitdiffstats
path: root/ipsec-tools-controller.lua
blob: 2a31dd640083e2444f75450f5e260396bdf86096 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
module(..., package.seeall)

-- This is the object/text used when we want to add a new record

require("format")

local list_redir = function (self)
	self.conf.action = "status"
	self.conf.type = "redir"
	error (self.conf)
end

mvc = {}
mvc.on_load = function(self, parent)
	if (self.worker[self.conf.action] == nil ) or ( self.conf.action == "init" ) then
		self.worker[self.conf.action] = list_redir(self)
	end
end

-- ################################################################################
-- PUBLIC FUNCTIONS
function status(self)
	return { status=self.model.getstatus() }
end