From 38bf8fee8605b17870c7f38f04e199d0a7f03925 Mon Sep 17 00:00:00 2001 From: Chris Hoge Date: Wed, 31 Oct 2018 08:29:01 -0700 Subject: [PATCH] Scoring for new Keystone capabilities Scored Keystone capabilities, added token delete (and fixed failing gate by ignoring new conflicting lint warnings) Change-Id: I75e4e30c67f6b9a393c275011af6528f6d3d4e80 --- next.json | 20 ++++++++++++++++++-- tox.ini | 3 ++- working_materials/scoring.txt | 15 +++++++++------ working_materials/tabulate_scores.py | 6 +++--- working_materials/tabulated_scores.csv | 5 ++++- 5 files changed, 36 insertions(+), 13 deletions(-) diff --git a/next.json b/next.json index b7e917cb..4849d017 100644 --- a/next.json +++ b/next.json @@ -161,7 +161,8 @@ ], "advisory": [ "volumes-v3-upload", - "compute-servers-create-multiple" + "compute-servers-create-multiple", + "identity-v3-tokens-delete" ], "deprecated": [ "volumes-v2-reserve", @@ -214,7 +215,8 @@ "objectstore-temp-url-put", "identity-v3-tokens-create" ], - "advisory": [], + "advisory": [ + "identity-v3-tokens-delete"], "deprecated": [], "removed": [] }, @@ -1272,6 +1274,20 @@ } } }, + "identity-v3-tokens-delete": { + "achievements": [ + "" + ], + "admin": false, + "descriptin": "Delete (revoke) identity token API", + "project": "keystone", + "required_since": "", + "tests": { + "tempest.api.identity.v3.test_tokens.TokensV3Test.test_token_auth_creation_existence_deletion": { + "idempotent_id": "id-0f9f5a5f-d5cd-4a86-8a5b-c5ded151f212" + } + } + }, "images-v2-index": { "achievements": [ "foundation", diff --git a/tox.ini b/tox.ini index fa127553..0e550c53 100644 --- a/tox.ini +++ b/tox.ini @@ -24,6 +24,7 @@ commands= [testenv:pep8] basepython = python3 +ignore = W504 deps = flake8 {[testenv]deps} @@ -39,7 +40,7 @@ whitelist_externals = [flake8] # E125 is deliberately excluded. # See https://github.com/jcrocholl/pep8/issues/126 -ignore = E125 +ignore = E125,W504 exclude = .venv,.git,.tox,doc,conf.py [testenv:jsonlint] diff --git a/working_materials/scoring.txt b/working_materials/scoring.txt index 009c49d9..b7646de4 100644 --- a/working_materials/scoring.txt +++ b/working_materials/scoring.txt @@ -299,12 +299,15 @@ Notes: Identity -------- -identity-v3-api-discovery: [1,0,1] [1,1,1] [1,1,1] [1,1,1] [1] [94]* -identity-v3-catalog: [1,0,1] [1,1,1] [1,1,0] [1,1,1] [1] [85]* -identity-v3-list-projects: [1,1,1] [1,1,1] [1,1,0] [0,1,0] [1] [74]* -identity-v3-list-groups: [1,1,1] [1,1,1] [1,1,0] [0,1,0] [1] [74]* -identity-v3-tokens-create: [1,1,1] [1,1,1] [1,1,1] [1,1,0] [1] [92]* -identity-v3-tokens-validate: [1,1,1] [1,1,1] [1,1,0] [0,1,0] [1] [74]* +identity-v3-api-discovery: [1,0,1] [1,1,1] [1,1,1] [1,1,1] [1] [94]* +identity-v3-catalog: [1,0,1] [1,1,1] [1,1,0] [1,1,1] [1] [85]* +identity-v3-list-projects: [1,1,1] [1,1,1] [1,1,0] [0,1,0] [1] [74]* +identity-v3-list-groups: [1,1,1] [1,1,1] [1,1,0] [0,1,0] [1] [74]* +identity-v3-tokens-create: [1,1,1] [1,1,1] [1,1,1] [1,1,0] [1] [92]* +identity-v3-tokens-validate: [1,1,1] [1,1,1] [1,1,1] [0,1,0] [1] [83]* +identity-v3-tokens-delete: [1,0,1] [1,1,1] [1,1,0] [1,1,0] [1] [77]* +identity-v3-application-credentials: [0,0,1] [1,0,0] [1,1,0] [0,1,0] [1] [43] +identity-v3-user-password: [0,0,1] [1,1,1] [1,1,0] [1,1,0] [1] [69] Notes: * identity-v3-list-projects and identity-v3-list-groups didn't have usable diff --git a/working_materials/tabulate_scores.py b/working_materials/tabulate_scores.py index 7b6975ea..8b6f9d90 100755 --- a/working_materials/tabulate_scores.py +++ b/working_materials/tabulate_scores.py @@ -105,7 +105,7 @@ with open(args.score_file_name) as filehandle: # The optional asterisk on the end indicates that the total score # is greater than or equal to the cutoff_score parsed from the JSON # file and therefore the Capability warrants inclusion in the Guideline. - pattern = re.compile('((\S+):\s+((\[\S,\S,\S\] ){4}\[\S\]))') + pattern = re.compile(r'((\S+):\s+((\[\S,\S,\S\] ){4}\[\S\]))') # The scores in the tuples have the following meanings, in # the order they appear in the scoring files. @@ -136,7 +136,7 @@ with open(args.score_file_name) as filehandle: csv_outfile.write("%s," % cap_name) # Grock the scores into a dict keyed by capability name. - scores = re.sub('[\[\]\, ]', '', raw.group(3)) + scores = re.sub(r'[\[\]\, ]', '', raw.group(3)) score_hash = dict(zip(scorenames, list(scores))) # Now tabluate scores for this capability. Scores will @@ -164,7 +164,7 @@ with open(args.score_file_name) as filehandle: continue # If the score is a digit, add it in to the total. - if re.match('\d', score_hash[scorename]): + if re.match(r'\d', score_hash[scorename]): total += (int(score_hash[scorename]) * int(criteria[scorename]['weight'])) diff --git a/working_materials/tabulated_scores.csv b/working_materials/tabulated_scores.csv index 4d1b3ae6..386582e8 100644 --- a/working_materials/tabulated_scores.csv +++ b/working_materials/tabulated_scores.csv @@ -107,7 +107,10 @@ identity-v3-catalog,1,0,1,1,1,1,1,1,0,1,1,1,1,85* identity-v3-list-projects,1,1,1,1,1,1,1,1,0,0,1,0,1,74* identity-v3-list-groups,1,1,1,1,1,1,1,1,0,0,1,0,1,74* identity-v3-tokens-create,1,1,1,1,1,1,1,1,1,1,1,0,1,92* -identity-v3-tokens-validate,1,1,1,1,1,1,1,1,0,0,1,0,1,74* +identity-v3-tokens-validate,1,1,1,1,1,1,1,1,1,0,1,0,1,83* +identity-v3-tokens-delete,1,0,1,1,1,1,1,1,0,1,1,0,1,77* +identity-v3-application-credentials,0,0,1,1,0,0,1,1,0,0,1,0,1,43 +identity-v3-user-password,0,0,1,1,1,1,1,1,0,1,1,0,1,69 objectstore-object-copy,1,1,1,1,1,1,1,1,1,1,1,1,1,100* objectstore-object-create,1,1,1,1,1,1,1,1,1,1,1,1,1,100* objectstore-object-delete,1,1,1,1,1,1,1,1,1,1,1,1,1,100*