diff options
author | Ted Trask <ttrask01@yahoo.com> | 2011-10-10 15:24:51 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2011-10-10 15:24:51 +0000 |
commit | 6e029cd625261b77c94cdf3c38139a7d0fc381c4 (patch) | |
tree | fb0bfb84215f86f0a6547adb3b90c7ca2316abf7 /provisioning-controller.lua | |
parent | a47f82e3b84e6757501d1cec6a78870dc6c459c0 (diff) | |
download | acf-provisioning-6e029cd625261b77c94cdf3c38139a7d0fc381c4.tar.bz2 acf-provisioning-6e029cd625261b77c94cdf3c38139a7d0fc381c4.tar.xz |
Added viewclassparams, getfile, and putfile actions plus determine_class.lua script and provisioning_requests table.
viewclassparams shows the parameters and default values for a class
getfile is used to get the config file for a known device and a default config file for unconfigured devices
putfile is unimplemented, but will be used for parsing files uploaded to the server
determine_class.lua determines which device class best matches an unconfigured device (by agent)
provisioning_requests table will track the last request (ip, agent, and timestamp) for each device
Diffstat (limited to 'provisioning-controller.lua')
-rw-r--r-- | provisioning-controller.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/provisioning-controller.lua b/provisioning-controller.lua index d9b4cbc..a4a49df 100644 --- a/provisioning-controller.lua +++ b/provisioning-controller.lua @@ -52,6 +52,10 @@ deleteclass = function( self ) return self:redirect_to_referrer(self.model.delete_class(self.clientdata.class_id)) end +viewclassparams = function( self ) + return self.model.get_class_params(self.clientdata.class_id) +end + listgroups = function( self ) return self.model.list_groups() end @@ -140,3 +144,11 @@ end dumpdatabase = function( self ) return controllerfunctions.handle_form(self, self.model.get_database, self.model.dump_database, self.clientdata, "Submit", "Dump Provisioning Database") end + +getfile = function( self ) + return self.model.get_file(self.clientdata.mac, self.clientdata.ip, self.clientdata.agent) +end + +putfile = function( self ) + return self.model.put_file(self.clientdata.file, self.clientdata.root, self.clientdata.data, self.clientdata.ip, self.clientdata.agent) +end |