mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
Quagga (#130)
* add error handling * Bugfix: Fix modal not closing * Quagga: add OSPF actions * bump Version
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
PLUGIN_NAME= quagga
|
||||
PLUGIN_VERSION= 1.0.1
|
||||
PLUGIN_VERSION= 1.1.0
|
||||
PLUGIN_COMMENT= Quagga Routing Suite
|
||||
PLUGIN_DEPENDS= quagga ruby
|
||||
PLUGIN_MAINTAINER= franz.fabian.94@gmail.com
|
||||
|
||||
+2
@@ -150,6 +150,7 @@ class OspfsettingsController extends ApiMutableModelControllerBase
|
||||
// save config if validated correctly
|
||||
$mdlOSPF->serializeToConfig();
|
||||
Config::getInstance()->save();
|
||||
unset($result['validations']);
|
||||
$result["result"] = "saved";
|
||||
}
|
||||
}
|
||||
@@ -174,6 +175,7 @@ class OspfsettingsController extends ApiMutableModelControllerBase
|
||||
// save config if validated correctly
|
||||
$mdlOSPF->serializeToConfig();
|
||||
Config::getInstance()->save();
|
||||
unset($result['validations']);
|
||||
$result["result"] = "saved";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,8 +30,9 @@ class VTYSH
|
||||
end
|
||||
|
||||
def execute(param)
|
||||
o = `vtysh -c "#{param.shellescape}"`
|
||||
o = `#{@path} -c #{param.shellescape}`
|
||||
raise "error" if o.length <= 2
|
||||
raise "command error - command: #{param}" if o.include? "% Unknown command"
|
||||
o
|
||||
end
|
||||
|
||||
|
||||
@@ -27,3 +27,40 @@ command:/usr/local/etc/rc.d/quagga status;exit 0
|
||||
parameters:
|
||||
type:script_output
|
||||
message:request quagga
|
||||
|
||||
[ospf-database]
|
||||
command:/usr/local/opnsense/scripts/quagga/quagga.rb --ospf-database
|
||||
parameters:
|
||||
type:script_output
|
||||
message: Shows the OSPF database
|
||||
|
||||
[ospf-route]
|
||||
command:/usr/local/opnsense/scripts/quagga/quagga.rb --ospf-route
|
||||
parameters:
|
||||
type:script_output
|
||||
message: print OSPF routing table
|
||||
|
||||
[ospf-interface]
|
||||
command:/usr/local/opnsense/scripts/quagga/quagga.rb --ospf-interface
|
||||
parameters:
|
||||
type:script_output
|
||||
message: print OSPF interface information
|
||||
|
||||
[ospf-neighbor]
|
||||
command:/usr/local/opnsense/scripts/quagga/quagga.rb --ospf-neighbor
|
||||
parameters:
|
||||
type:script_output
|
||||
message: Print OSPF neighbors
|
||||
|
||||
[ospf-overview]
|
||||
command:/usr/local/opnsense/scripts/quagga/quagga.rb --ospf-overview
|
||||
parameters:
|
||||
type:script_output
|
||||
message: Print OSPF summary
|
||||
|
||||
[general-routes]
|
||||
command:/usr/local/opnsense/scripts/quagga/quagga.rb --general-routes
|
||||
parameters:
|
||||
type:script_output
|
||||
message: Print Routing Table
|
||||
|
||||
|
||||
Reference in New Issue
Block a user