aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2020-01-03 16:37:27 +0100
committerPaul Vinciguerra <pvinci@vinciconsulting.com>2020-01-04 16:14:04 +0000
commitf3aebda7eace119444c88df52fb8d6c3e9f4323b (patch)
treed26b359b225681ff3f37a685e7635f727bb5ce8e /src
parent69c2a5895a7233076fdf4328a80bd0777931d159 (diff)
misc: fix feature.yaml
Add checkfeaturelist validation to checkstyle. Fix two files with errors. Type: docs Change-Id: I81eda0e25b271f2006b4da22efdf7218d52a67d3 Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/scripts/fts.py14
-rw-r--r--src/vnet/bfd/FEATURE.yaml1
-rw-r--r--src/vnet/lldp/FEATURE.yaml1
3 files changed, 10 insertions, 6 deletions
diff --git a/src/scripts/fts.py b/src/scripts/fts.py
index f3165ced0cd..750b73f8dcc 100755
--- a/src/scripts/fts.py
+++ b/src/scripts/fts.py
@@ -6,7 +6,7 @@ import ipaddress
import yaml
from pprint import pprint
import re
-from jsonschema import validate
+from jsonschema import validate, exceptions
import argparse
from subprocess import run, PIPE
@@ -96,10 +96,11 @@ def output_markdown(features):
print('# {}'.format(v['name']))
if type(v['maintainer']) is list:
print('Maintainers: ' +
- ', '.join('{}'.format(m) for m in v['maintainer']))
+ ', '.join('{}'.format(m) for m in
+ v['maintainer']) + ' ')
else:
print('Maintainer: {} '.format(v['maintainer']))
- print('State: {}\n'.format(v['state']))
+ print('State: {} \n'.format(v['state']))
print('{}\n'.format(v['description']))
output_features(0, v['features'])
if 'missing' in v:
@@ -137,7 +138,12 @@ def main():
# Load configuration file
with open(featurefile) as f:
cfg = yaml.load(f, Loader=yaml.SafeLoader)
- validate(instance=cfg, schema=schema)
+ try:
+ validate(instance=cfg, schema=schema)
+ except exceptions.ValidationError:
+ print('File does not validate: {}'.format(featurefile),
+ file=sys.stderr)
+ raise
features[featurefile] = cfg
if args.markdown:
diff --git a/src/vnet/bfd/FEATURE.yaml b/src/vnet/bfd/FEATURE.yaml
index cf0e300f2fe..5c14281f6db 100644
--- a/src/vnet/bfd/FEATURE.yaml
+++ b/src/vnet/bfd/FEATURE.yaml
@@ -4,6 +4,5 @@ maintainer: Klement Sekera <ksekera@cisco.com>
features:
- BFD protocol implementation
description: "Bidirectional Forwarding Detection implementation"
-missing:
state: production
properties: [API, CLI, STATS, MULTITHREAD]
diff --git a/src/vnet/lldp/FEATURE.yaml b/src/vnet/lldp/FEATURE.yaml
index 9672269eeea..0d3277d53ab 100644
--- a/src/vnet/lldp/FEATURE.yaml
+++ b/src/vnet/lldp/FEATURE.yaml
@@ -4,6 +4,5 @@ maintainer: Klement Sekera <ksekera@cisco.com>
features:
- link layer discovery protocol implementation
description: "Link Layer Discovery Protocol implementation"
-missing:
state: production
properties: [API, CLI, STATS, MULTITHREAD]