Reorganize guidelines and improve consistency.sh

Reorganize guidelines into guidelines directory and create
current_guideline that is softlink to the latest approved guideline.
The same with add-ons guidelines - they are moved to guidelines
directory within add-ons one and soft links are created pointing
to the latest guidelines for each add-on.

Also cleaned up some tooling that hardwired where guidelines lived.

Change-Id: I5ad4b91b1afb44a0a6987b339f7efba14f395302
This commit is contained in:
ArkadyKanevsky 2021-04-12 18:02:12 -05:00 committed by Martin Kopec
parent f4c568cf94
commit de96ee2d12
43 changed files with 80 additions and 64 deletions

View File

@ -0,0 +1 @@
guidelines/dns.2020.11.json

View File

@ -0,0 +1 @@
guidelines/orchestration.2020.11.json

View File

@ -0,0 +1 @@
guidelines/shared_file_system.2020.11.json

1
current_guideline Symbolic link
View File

@ -0,0 +1 @@
guidelines/2020.11.json

View File

@ -80,25 +80,25 @@ fi
export PYTHONPATH=$TEMPESTDIR:$DNSDIR:$ORCHESTRATIONDIR:$SFSDIR export PYTHONPATH=$TEMPESTDIR:$DNSDIR:$ORCHESTRATIONDIR:$SFSDIR
python3 ./tools/checktests.py --guideline next.json python3 ./tools/checktests.py --guideline guidelines/next.json
exit_1=$? exit_1=$?
python3 ./tools/checktests.py --guideline add-ons/dns.next.json --testlib designate_tempest_plugin python3 ./tools/checktests.py --guideline add-ons/guidelines/dns.next.json --testlib designate_tempest_plugin
exit_2=$? exit_2=$?
python3 ./tools/checktests.py --guideline add-ons/shared_file_system.next.json --testlib manila_tempest_tests python3 ./tools/checktests.py --guideline add-ons/guidelines/shared_file_system.next.json --testlib manila_tempest_tests
exit_3=$? exit_3=$?
# TODO(kopecmartin) consistency check of heat_tempest_plugin is omitted intentionally until we improve the # TODO(kopecmartin) consistency check of heat_tempest_plugin is omitted intentionally until we improve the
# checktests.py so that it detects ids of the heat_tempest_plugin.api tests which don't use decorator.idempotent_id # checktests.py so that it detects ids of the heat_tempest_plugin.api tests which don't use decorator.idempotent_id
# call to track the id # call to track the id
# python3 ./tools/checktests.py --guideline add-ons/orchestration.next.json --testlib heat_tempest_plugin # python3 ./tools/checktests.py --guideline add-ons/guidelines/orchestration.next.json --testlib heat_tempest_plugin
# exit_4=$? # exit_4=$?
python3 ./tools/checktests.py --guideline 2020.11.json python3 ./tools/checktests.py --guideline current_guideline
exit_5=$? exit_5=$?
python3 ./tools/checktests.py --guideline add-ons/dns.2020.11.json --testlib designate_tempest_plugin python3 ./tools/checktests.py --guideline add-ons/dns_current_guideline --testlib designate_tempest_plugin
exit_6=$? exit_6=$?
python3 ./tools/checktests.py --guideline add-ons/shared_file_system.2020.11.json --testlib manila_tempest_tests python3 ./tools/checktests.py --guideline add-ons/shared_file_system_current_guideline --testlib manila_tempest_tests
exit_7=$? exit_7=$?
# python3 ./tools/checktests.py --guideline add-ons/orchestration.2020.11.json --testlib heat_tempest_plugin # python3 ./tools/checktests.py --guideline add-ons/orchestration_current_guideline --testlib heat_tempest_plugin
# exit_8=$? # exit_8=$?

View File

@ -20,9 +20,9 @@ import os
from refstack.api.guidelines import Guidelines from refstack.api.guidelines import Guidelines
BASE_URL = "https://opendev.org/api/v1/repos/osf/interop/" BASE_URL = "https://opendev.org/api/v1/repos/osf/interop/"
REPO_URL = BASE_URL + "contents/previous_guidelines" REPO_URL = BASE_URL + "contents/guidelines"
RAW_URL = "https://opendev.org/api/v1/repos/osf/interop/raw/" RAW_URL = "https://opendev.org/api/v1/repos/osf/interop/raw/"
ADDITIONAL_CAPABILITY_URLS = BASE_URL + "contents/add-ons/previous_guidelines" ADDITIONAL_CAPABILITY_URLS = BASE_URL + "contents/add-ons/guidelines"
def parse_arguments(): def parse_arguments():
@ -49,15 +49,17 @@ def parse_tests(f_path, target):
def main(): def main():
args = parse_arguments() args = parse_arguments()
tests = parse_tests( tests = parse_tests(
os.path.join(args.interop_repo, 'next.json'), 'platform') os.path.join(args.interop_repo, 'guidelines/next.json'), 'platform')
tests += parse_tests( tests += parse_tests(
os.path.join(args.interop_repo, 'add-ons/dns.next.json'), 'dns') os.path.join(args.interop_repo, 'add-ons/guidelines/dns.next.json'),
'dns')
tests += parse_tests( tests += parse_tests(
os.path.join(args.interop_repo, 'add-ons/orchestration.next.json'), os.path.join(args.interop_repo,
'add-ons/guidelines/orchestration.next.json'),
'orchestration') 'orchestration')
tests += parse_tests( tests += parse_tests(
os.path.join(args.interop_repo, os.path.join(args.interop_repo,
'add-ons/shared_file_system.next.json'), 'add-ons/guidelines/shared_file_system.next.json'),
'shared_file_system') 'shared_file_system')
f = open(args.out, 'w') f = open(args.out, 'w')
for t in tests: for t in tests:

110
tox.ini
View File

@ -44,64 +44,74 @@ exclude = .venv,.git,.tox,doc,conf.py
[testenv:jsonlint] [testenv:jsonlint]
commands= commands=
jsonlint -s next.json jsonlint -s guidelines/next.json
jsonlint -s 2015.07.json jsonlint -s guidelines/2015.07.json
jsonlint -s 2016.01.json jsonlint -s guidelines/2016.01.json
jsonlint -s 2016.08.json jsonlint -s guidelines/2016.08.json
jsonlint -s 2017.01.json jsonlint -s guidelines/2017.01.json
jsonlint -s 2017.09.json jsonlint -s guidelines/2017.09.json
jsonlint -s 2018.02.json jsonlint -s guidelines/2018.02.json
jsonlint -s 2018.11.json jsonlint -s guidelines/2018.11.json
jsonlint -s 2019.06.json jsonlint -s guidelines/2019.06.json
jsonlint -s 2019.11.json jsonlint -s guidelines/2019.11.json
jsonlint -s 2020.06.json jsonlint -s guidelines/2020.06.json
jsonlint -s 2020.11.json jsonlint -s guidelines/2020.11.json
jsonlint -s current_guideline
jsonlint -s doc/source/schema/1.5.json jsonlint -s doc/source/schema/1.5.json
jsonlint -s doc/source/schema/1.6.json jsonlint -s doc/source/schema/1.6.json
jsonlint -s doc/source/schema/2.0.json jsonlint -s doc/source/schema/2.0.json
jsonlint -s doc/source/schema/next.2.0.json jsonlint -s doc/source/schema/next.2.0.json
jsonlint -s add-ons/dns.next.json jsonlint -s add-ons/guidelines/dns.next.json
jsonlint -s add-ons/orchestration.next.json jsonlint -s add-ons/guidelines/dns.2018.02.json
jsonlint -s add-ons/dns.2018.02.json jsonlint -s add-ons/guidelines/dns.2019.06.json
jsonlint -s add-ons/dns.2019.06.json jsonlint -s add-ons/guidelines/dns.2019.11.json
jsonlint -s add-ons/dns.2019.11.json jsonlint -s add-ons/guidelines/dns.2020.06.json
jsonlint -s add-ons/dns.2020.06.json jsonlint -s add-ons/guidelines/dns.2020.11.json
jsonlint -s add-ons/dns.2020.11.json jsonlint -s add-ons/guidelines/orchestration.next.json
jsonlint -s add-ons/orchestration.2018.02.json jsonlint -s add-ons/guidelines/orchestration.2018.02.json
jsonlint -s add-ons/orchestration.2019.06.json jsonlint -s add-ons/guidelines/orchestration.2019.06.json
jsonlint -s add-ons/orchestration.2019.11.json jsonlint -s add-ons/guidelines/orchestration.2019.11.json
jsonlint -s add-ons/orchestration.2020.06.json jsonlint -s add-ons/guidelines/orchestration.2020.06.json
jsonlint -s add-ons/orchestration.2020.11.json jsonlint -s add-ons/guidelines/orchestration.2020.11.json
jsonlint -s add-ons/shared_file_system.next.json jsonlint -s add-ons/guidelines/shared_file_system.next.json
jsonlint -s add-ons/guidelines/shared_file_system.2020.11.json
jsonlint -s add-ons/dns_current_guideline
jsonlint -s add-ons/orchestration_current_guideline
jsonlint -s add-ons/shared_file_system_current_guideline
[testenv:jsonschema] [testenv:jsonschema]
commands= commands=
jsonschema doc/source/schema/2.0.json -i next.json jsonschema doc/source/schema/2.0.json -i guidelines/next.json
jsonschema doc/source/schema/1.5.json -i 2015.07.json jsonschema doc/source/schema/1.5.json -i guidelines/2015.07.json
jsonschema doc/source/schema/1.5.json -i 2016.01.json jsonschema doc/source/schema/1.5.json -i guidelines/2016.01.json
jsonschema doc/source/schema/1.6.json -i 2016.08.json jsonschema doc/source/schema/1.6.json -i guidelines/2016.08.json
jsonschema doc/source/schema/1.6.json -i 2017.01.json jsonschema doc/source/schema/1.6.json -i guidelines/2017.01.json
jsonschema doc/source/schema/1.6.json -i 2017.09.json jsonschema doc/source/schema/1.6.json -i guidelines/2017.09.json
jsonschema doc/source/schema/2.0.json -i 2018.02.json jsonschema doc/source/schema/2.0.json -i guidelines/2018.02.json
jsonschema doc/source/schema/2.0.json -i 2018.11.json jsonschema doc/source/schema/2.0.json -i guidelines/2018.11.json
jsonschema doc/source/schema/2.0.json -i 2019.06.json jsonschema doc/source/schema/2.0.json -i guidelines/2019.06.json
jsonschema doc/source/schema/2.0.json -i 2019.11.json jsonschema doc/source/schema/2.0.json -i guidelines/2019.11.json
jsonschema doc/source/schema/2.0.json -i 2020.06.json jsonschema doc/source/schema/2.0.json -i guidelines/2020.06.json
jsonschema doc/source/schema/2.0.json -i 2020.11.json jsonschema doc/source/schema/2.0.json -i guidelines/2020.11.json
jsonschema doc/source/schema/2.0.json -i current_guideline
jsonschema doc/source/schema/2.0.json -i doc/source/schema/next.2.0.json jsonschema doc/source/schema/2.0.json -i doc/source/schema/next.2.0.json
jsonschema doc/source/schema/2.0.json -i add-ons/dns.next.json jsonschema doc/source/schema/2.0.json -i add-ons/guidelines/dns.next.json
jsonschema doc/source/schema/2.0.json -i add-ons/orchestration.next.json jsonschema doc/source/schema/2.0.json -i add-ons/guidelines/dns.2018.02.json
jsonschema doc/source/schema/2.0.json -i add-ons/dns.2018.02.json jsonschema doc/source/schema/2.0.json -i add-ons/guidelines/dns.2019.06.json
jsonschema doc/source/schema/2.0.json -i add-ons/dns.2019.06.json jsonschema doc/source/schema/2.0.json -i add-ons/guidelines/dns.2019.11.json
jsonschema doc/source/schema/2.0.json -i add-ons/dns.2019.11.json jsonschema doc/source/schema/2.0.json -i add-ons/guidelines/dns.2020.06.json
jsonschema doc/source/schema/2.0.json -i add-ons/dns.2020.06.json jsonschema doc/source/schema/2.0.json -i add-ons/guidelines/dns.2020.11.json
jsonschema doc/source/schema/2.0.json -i add-ons/dns.2020.11.json jsonschema doc/source/schema/2.0.json -i add-ons/guidelines/orchestration.next.json
jsonschema doc/source/schema/2.0.json -i add-ons/orchestration.2018.02.json jsonschema doc/source/schema/2.0.json -i add-ons/guidelines/orchestration.2018.02.json
jsonschema doc/source/schema/2.0.json -i add-ons/orchestration.2019.06.json jsonschema doc/source/schema/2.0.json -i add-ons/guidelines/orchestration.2019.06.json
jsonschema doc/source/schema/2.0.json -i add-ons/orchestration.2019.11.json jsonschema doc/source/schema/2.0.json -i add-ons/guidelines/orchestration.2019.11.json
jsonschema doc/source/schema/2.0.json -i add-ons/orchestration.2020.06.json jsonschema doc/source/schema/2.0.json -i add-ons/guidelines/orchestration.2020.06.json
jsonschema doc/source/schema/2.0.json -i add-ons/orchestration.2020.11.json jsonschema doc/source/schema/2.0.json -i add-ons/guidelines/orchestration.2020.11.json
jsonschema doc/source/schema/2.0.json -i add-ons/shared_file_system.next.json jsonschema doc/source/schema/2.0.json -i add-ons/guidelines/shared_file_system.next.json
jsonschema doc/source/schema/2.0.json -i add-ons/guidelines/shared_file_system.2020.11.json
jsonschema doc/source/schema/2.0.json -i add-ons/dns_current_guideline
jsonschema doc/source/schema/2.0.json -i add-ons/orchestration_current_guideline
jsonschema doc/source/schema/2.0.json -i add-ons/shared_file_system_current_guideline
[testenv:consistency] [testenv:consistency]
commands= commands=