diff options
author | Ted Trask <ttrask01@yahoo.com> | 2009-09-17 16:18:32 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2009-09-17 16:18:32 +0000 |
commit | e4580cd98e5e42612dfa49ccfa2bb79fc47cfab5 (patch) | |
tree | 8db120c961cbde070b672c51c2a2446e3e7b6a39 /qos-controller.lua | |
download | acf-iproute2-qos-e4580cd98e5e42612dfa49ccfa2bb79fc47cfab5.tar.bz2 acf-iproute2-qos-e4580cd98e5e42612dfa49ccfa2bb79fc47cfab5.tar.xz |
First cut at ACF for iproute2-qosv0.1.0
Diffstat (limited to 'qos-controller.lua')
-rw-r--r-- | qos-controller.lua | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/qos-controller.lua b/qos-controller.lua new file mode 100644 index 0000000..c3358e8 --- /dev/null +++ b/qos-controller.lua @@ -0,0 +1,30 @@ +module(..., package.seeall) + +-- Load libraries +require("controllerfunctions") + +default_action = "status" + +function status(self) + return self.model.getstatus() +end + +function startstop(self) + return controllerfunctions.handle_startstop(self, function(action) return self.model.startstop_service(self.clientdata.init, action) end, self.clientdata) +end + +function details(self) + return self.model.listinterfacedetails(self) +end + +function enable(self) + return self:redirect_to_referrer(self.model.enable(self.clientdata.interface)) +end + +function config(self) + return controllerfunctions.handle_form(self, function() return self.model.get_config(self.clientdata.DEV) end, self.model.update_config, self.clientdata, "Save", "Edit QOS Config", "Configuration Set") +end + +function expert(self) + return controllerfunctions.handle_form(self, function() return self.model.get_filedetails(self.clientdata.interface) end, self.model.update_filedetails, self.clientdata, "Save", "Edit QOS Config", "Configuration Set") +end |