interop/2015.04/required.py
Chris Hoge ad6c04828a Added supplemental files for testing 2015.04
Added a directory of supplemental files for helping to run
Defcore for the 2015.04 standard. Includes a list of all api
tests for the suggested Tempest version, a list of the required
Defcore tests, the simple python tool to generate the required
test list, and a prodecure document for running tests.

Change-Id: Icd93fe30b90cf29fd52b2da3198f2bd6e0362ab0
2015-04-21 17:57:25 -07:00

35 lines
885 B
Python

import json
import urllib
url = 'https://raw.githubusercontent.com/openstack/defcore/master/2015.04.json'
response = urllib.urlopen(url)
defcore = json.loads(response.read())
capabilities = defcore['capabilities']
required_tests = []
for capability_name in capabilities:
capability = capabilities[capability_name]
if capability['status'] == 'required':
tests = capability['tests']
for test in tests:
required_tests.append(test)
required_tests.sort()
alltests = []
for line in open('7c8fcc67-api-test-list.txt'):
alltests.append(line.rstrip())
alltests.sort()
# n^2, terrible
for rtest in required_tests:
testmatch = rtest + '['
found = False
for test in alltests:
if test.startswith(testmatch):
print test
found = True
if not found:
print "!!! Did not find test matching " % (rtest)