summaryrefslogtreecommitdiffstats
path: root/ospf-controller.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-controller.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-controller.lua')
-rw-r--r--ospf-controller.lua13
1 files changed, 7 insertions, 6 deletions
diff --git a/ospf-controller.lua b/ospf-controller.lua
index 9cabb3b..fbdbc6f 100644
--- a/ospf-controller.lua
+++ b/ospf-controller.lua
@@ -1,20 +1,21 @@
-module(..., package.seeall)
+local mymodule = {}
-default_action = "status"
+mymodule.default_action = "status"
-function status(self)
+function mymodule.status(self)
return self.model.getstatus()
end
-function details(self)
+function mymodule.details(self)
return self.model.getdetails()
end
-function startstop(self)
+function mymodule.startstop(self)
return self.handle_form(self, self.model.get_startstop, self.model.startstop_service, self.clientdata)
end
-function expert(self)
+function mymodule.expert(self)
return self.handle_form(self, self.model.getconfigfile, self.model.setconfigfile, self.clientdata, "Save", "Edit OSPF Config", "OSPF Configuration Saved")
end
+return mymodule