Included the temporary yang model extraction directory in the list of model librarires given to yanglint, in order to support drafts with models referencing models in the same draft. Fixes issue #2324.

- Legacy-Id: 13736
This commit is contained in:
Henrik Levkowetz 2017-06-29 21:03:26 +00:00
parent ade8973015
commit 60e9b7451c
2 changed files with 2 additions and 2 deletions

View file

@ -671,7 +671,7 @@ IDSUBMIT_STAGING_PATH = '/a/www/www6s/staging/'
IDSUBMIT_STAGING_URL = '//www.ietf.org/staging/'
IDSUBMIT_IDNITS_BINARY = '/a/www/ietf-datatracker/scripts/idnits'
SUBMIT_PYANG_COMMAND = 'pyang --verbose --ietf -p {libs} {model}'
SUBMIT_YANGLINT_COMMAND = 'yanglint --verbose -p {rfclib} -p {draftlib} {model}'
SUBMIT_YANGLINT_COMMAND = 'yanglint --verbose -p {rfclib} -p {draftlib} -p {tmplib} {model}'
SUBMIT_YANGLINT_COMMAND = None # use the value above if you have yanglint installed
IDSUBMIT_CHECKER_CLASSES = (

View file

@ -229,7 +229,7 @@ class DraftYangChecker(object):
cmd_template = settings.SUBMIT_YANGLINT_COMMAND
command = cmd_template.split()[0]
cmd_version = VersionInfo.objects.get(command=command).version
cmd = cmd_template.format(model=path, rfclib=settings.SUBMIT_YANG_RFC_MODEL_DIR, draftlib=settings.SUBMIT_YANG_DRAFT_MODEL_DIR)
cmd = cmd_template.format(model=path, rfclib=settings.SUBMIT_YANG_RFC_MODEL_DIR, draftlib=settings.SUBMIT_YANG_DRAFT_MODEL_DIR, tmplib=workdir)
code, out, err = pipe(cmd)
if code > 0:
error_lines = err.splitlines()