summaryrefslogtreecommitdiffstats
path: root/config/process_put.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2013-09-23 18:13:03 +0000
committerTed Trask <ttrask01@yahoo.com>2013-09-23 18:13:03 +0000
commitfb00ff8f05dae3c110beceb929ea036e4cd14ae1 (patch)
tree51d124ce1c65e3a600a7da7b9dd57ffafd83f910 /config/process_put.lua
parent60ef6e20019e046aa801325d29893ada12b5d5af (diff)
downloadacf-provisioning-fb00ff8f05dae3c110beceb929ea036e4cd14ae1.tar.bz2
acf-provisioning-fb00ff8f05dae3c110beceb929ea036e4cd14ae1.tar.xz
Change function prototypes to pass self and use self.model instead of functions table
Changed the order of the first two parameters passed to validate function in provisioning_params Replaced all APP references with self, now that self is available Still need to implement swapvalidateparams script
Diffstat (limited to 'config/process_put.lua')
-rw-r--r--config/process_put.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/config/process_put.lua b/config/process_put.lua
index 4eabb1a..1a34042 100644
--- a/config/process_put.lua
+++ b/config/process_put.lua
@@ -1,10 +1,10 @@
-- This is the script run to process uploaded config files
-local functions, mac, data, device_id = ...
+local self, mac, data, device_id = ...
---APP.logevent("got to process_put script")
+--self.logevent("got to process_put script")
-- Get the params
-local params = functions.get_device_params(device_id)
+local params = self.get_device_params(self, device_id)
function process_polycom()
local before, xml, after = string.match(data, "(.*<OVERRIDES)([^/]*)(/>.*)")
@@ -18,7 +18,7 @@ function process_polycom()
end
-- for n,v in pairs(attrs) do
--- APP.logevent("name "..n.." val "..(v or ""))
+-- self.logevent("name "..n.." val "..(v or ""))
-- end
-- Read attributes from attrs and generate paramaters for ACF
@@ -57,7 +57,7 @@ if string.match(params.value.device.label, "Polycom") then
end
-- Update the params
-local params = functions.set_device_params(params)
+local params = self.set_device_params(self, params)
-- Return the updated data
return data