mirror of
https://github.com/nttgin/BGPalerter.git
synced 2024-05-19 06:50:08 +00:00
introduced -t option to test the configuration by generating fake BGP updates
This commit is contained in:
6
index.js
6
index.js
@@ -45,6 +45,10 @@ const params = yargs
|
||||
.nargs('c', 1)
|
||||
.describe('c', 'Config file to load')
|
||||
|
||||
.alias('t', 'test')
|
||||
.nargs('t', 0)
|
||||
.describe('v', 'Test the configuration with fake BGP updates')
|
||||
|
||||
.alias('d', 'data-volume')
|
||||
.nargs('d', 1)
|
||||
.describe('d', 'A directory where configuration and data is persisted')
|
||||
@@ -68,7 +72,6 @@ const params = yargs
|
||||
.nargs('e', 1)
|
||||
.describe('e', 'Comma-separated list of prefixes to exclude')
|
||||
|
||||
|
||||
.alias('p', 'prefixes')
|
||||
.nargs('p', 1)
|
||||
.describe('p', 'Comma-separated list of prefixes to include')
|
||||
@@ -143,6 +146,7 @@ switch(params._[0]) {
|
||||
break;
|
||||
|
||||
default: // Run monitor
|
||||
global.DRY_RUN = !!params.t;
|
||||
const Worker = require("./src/worker").default;
|
||||
module.exports = new Worker(params.c, params.d);
|
||||
}
|
||||
|
Reference in New Issue
Block a user