Skip to content

A try to add the custom commands#199

Open
zentavr wants to merge 1 commit into
gmazoyer:mainfrom
zentavr:main
Open

A try to add the custom commands#199
zentavr wants to merge 1 commit into
gmazoyer:mainfrom
zentavr:main

Conversation

@zentavr

@zentavr zentavr commented Mar 28, 2025

Copy link
Copy Markdown

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