summaryrefslogtreecommitdiffstats
path: root/bgp-model.lua
diff options
context:
space:
mode:
Diffstat (limited to 'bgp-model.lua')
-rw-r--r--bgp-model.lua15
1 files changed, 8 insertions, 7 deletions
diff --git a/bgp-model.lua b/bgp-model.lua
index 88badc6..c380163 100644
--- a/bgp-model.lua
+++ b/bgp-model.lua
@@ -1,4 +1,4 @@
-module(..., package.seeall)
+local mymodule = {}
-- Load libraries
modelfunctions = require("modelfunctions")
@@ -58,30 +58,31 @@ end
-- ################################################################################
-- PUBLIC FUNCTIONS
-function getstatus()
+function mymodule.getstatus()
return modelfunctions.getstatus(processname, packagename, "BGP Status")
end
-function getconfigfile()
+function mymodule.getconfigfile()
return modelfunctions.getfiledetails(configfile)
end
-function setconfigfile(self, filedetails)
+function mymodule.setconfigfile(self, filedetails)
return modelfunctions.setfiledetails(self, filedetails, {configfile})
end
-function get_startstop(self, clientdata)
+function mymodule.get_startstop(self, clientdata)
return modelfunctions.get_startstop(processname)
end
-function startstop_service(self, startstop, action)
+function mymodule.startstop_service(self, startstop, action)
return modelfunctions.startstop_service(startstop, action)
end
-function getdetails()
+function mymodule.getdetails()
local status = {}
status.showipbgp = cfe({ label="BGP routes" })
status.showipbgp.value = telnetshowipbgp()
return cfe({ type="group", value=status, label="BGP Details" })
end
+return mymodule