summaryrefslogtreecommitdiffstats
path: root/ospf-model.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2013-10-21 00:02:20 +0000
committerTed Trask <ttrask01@yahoo.com>2013-10-21 00:02:20 +0000
commit2262acb8dbee2e6005e679d454e5d4358ab443eb (patch)
treead2aa4bf237c205d10e52db75524634c0a804e97 /ospf-model.lua
parent31e61f1805982e6368bc77703e161af674c7687c (diff)
downloadacf-quagga-2262acb8dbee2e6005e679d454e5d4358ab443eb.tar.bz2
acf-quagga-2262acb8dbee2e6005e679d454e5d4358ab443eb.tar.xz
Remove all calls to 'module' in preparation for move to Lua 5.2
Use mymodule parameter for module definition. This was also helpful in revealing places where the code relied on the global environment.
Diffstat (limited to 'ospf-model.lua')
-rw-r--r--ospf-model.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/ospf-model.lua b/ospf-model.lua
index 383050b..27d779a 100644
--- a/ospf-model.lua
+++ b/ospf-model.lua
@@ -1,4 +1,4 @@
-module(..., package.seeall)
+local mymodule = {}
-- Load libraries
modelfunctions = require("modelfunctions")
@@ -55,31 +55,31 @@ end
-- ################################################################################
-- PUBLIC FUNCTIONS
-function get_startstop(self, clientdata)
+function mymodule.get_startstop(self, clientdata)
return modelfunctions.get_startstop(processname)
end
-function startstop_service(self, startstop, action)
+function mymodule.startstop_service(self, startstop, action)
return modelfunctions.startstop_service(startstop, action)
end
-function getstatus()
+function mymodule.getstatus()
return modelfunctions.getstatus(processname, packagename, "OSPF Status")
end
-function getconfigfile()
+function mymodule.getconfigfile()
return modelfunctions.getfiledetails(configfile)
end
-function setconfigfile(self, filedetails)
+function mymodule.setconfigfile(self, filedetails)
return modelfunctions.setfiledetails(self, filedetails, {configfile})
end
-function getdetails()
+function mymodule.getdetails()
local status = {}
status.showip = cfe({ label="OSPF routes" })
status.showip.value = telnetshowip()
return cfe({ type="group", value=status, label="OSPF Details" })
end
-
+return mymodule