1
0
mirror of https://github.com/nttgin/BGPalerter.git synced 2024-05-19 06:50:08 +00:00

added research environment in order to reduce production constraints

This commit is contained in:
Massimo Candela
2020-02-24 16:13:31 +01:00
parent e81e084294
commit f61f925991
4 changed files with 13 additions and 7 deletions

View File

@@ -145,6 +145,10 @@ export default class InputYml extends Input {
return "Not a valid prefix: " + prefix;
}
if (this.config.environment === "research") {
item.asn = item.asn || 0;
}
if (["string", "number"].includes(typeof(item.asn))) {
asns = [item.asn];
} else if (item.asn instanceof Array) {
@@ -153,6 +157,7 @@ export default class InputYml extends Input {
return "Not a valid AS number for: " + prefix;
}
if (!new AS(asns).isValid()) {
return "Not a valid AS number for: " + prefix;
}