diff options
author | Ted Trask <ttrask01@yahoo.com> | 2013-10-19 23:58:47 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2013-10-19 23:58:47 +0000 |
commit | cdc275fc78488777472445d5417dcc9e63b8b6b5 (patch) | |
tree | 2cc9f3f6b6d978c27de211d3194f43d76154db20 /qos-controller.lua | |
parent | 7a83c842a9ae46a39e3f3f7b6373531cfe0ab58d (diff) | |
download | acf-iproute2-qos-cdc275fc78488777472445d5417dcc9e63b8b6b5.tar.bz2 acf-iproute2-qos-cdc275fc78488777472445d5417dcc9e63b8b6b5.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 'qos-controller.lua')
-rw-r--r-- | qos-controller.lua | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/qos-controller.lua b/qos-controller.lua index f2c45ae..7c5d938 100644 --- a/qos-controller.lua +++ b/qos-controller.lua @@ -1,27 +1,29 @@ -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 startstopinterface(self) +function mymodule.startstopinterface(self) return self.handle_form(self, self.model.get_startstop, self.model.startstop_service, self.clientdata) end -function details(self) +function mymodule.details(self) return self.model.listinterfacedetails(self) end -function enable(self) +function mymodule.enable(self) return self.handle_form(self, self.model.get_enable, self.model.enable, self.clientdata, "Enable", "Enable QOS on Interface", "Enabled QOS on Interface") end -function config(self) +function mymodule.config(self) return self.handle_form(self, self.model.get_config, self.model.update_config, self.clientdata, "Save", "Edit QOS Config", "Configuration Set") end -function expert(self) +function mymodule.expert(self) return self.handle_form(self, self.model.get_filedetails, self.model.update_filedetails, self.clientdata, "Save", "Edit QOS Config", "Configuration Set") end + +return mymodule |