Skip to content

A try to add the custom commands #199

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

zentavr
Copy link

@zentavr zentavr commented Mar 28, 2025

Fixes:

#84

Just a concept how to add custom commands. Probably not ready for production code, with my case is being used in private password covered installation with very limited access. We use FRR and would like to add more commands for our NOC guys.

The commands could be added into config.php as:

$config['doc']['summary'] = array(
  'command' => 'show ip bgp summary',
  'description' => 'Show the status of all BGP connections',
  'parameter' => null,
  'accepts_parameters' => false,
  'quoted' => true,
  'wrapper' => 'vtysh -c'
);

$config['doc']['neighbors'] = array(
  'command' => 'show ip bgp neighbors',
  'description' => 'Show the BGP neighbors',
  'parameter' => null,
  'accepts_parameters' => false,
  'quoted' => true,
  'wrapper' => 'vtysh -c'
);

Actually, the javascript complains when the parameters field in the browser is empty, so we just add a garbage there, but also added little bit more values in config.php.

The code not covers all the use cases, maybe the settings contain a function/pseudo-code in one of the parameters about how and what to send into the routers console.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant