summaryrefslogtreecommitdiffstats
path: root/bgp-controller.lua
diff options
context:
space:
mode:
Diffstat (limited to 'bgp-controller.lua')
-rw-r--r--bgp-controller.lua26
1 files changed, 26 insertions, 0 deletions
diff --git a/bgp-controller.lua b/bgp-controller.lua
new file mode 100644
index 0000000..b344230
--- /dev/null
+++ b/bgp-controller.lua
@@ -0,0 +1,26 @@
+module(..., package.seeall)
+
+-- Load libraries
+require("controllerfunctions")
+
+default_action = "status"
+
+function welcome()
+end
+
+function status(self)
+ return self.model.getstatus()
+end
+
+function details(self)
+ return self.model.getdetails()
+end
+
+function expert(self)
+ return controllerfunctions.handle_form(self, self.model.getconfigfile, self.model.setconfigfile, self.clientdata, "Save", "Edit BGP Config", "BGP Configuration Saved")
+end
+
+function startstop(self)
+ return controllerfunctions.handle_startstop(self, self.model.startstop_service, self.model.getstatus, self.clientdata)
+end
+