1
0
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:
Massimo Candela
2020-07-25 15:59:45 +02:00
parent dd5f46387e
commit 6167fbed70
6 changed files with 33 additions and 7 deletions

View File

@@ -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);
}