Skip to content

Commit be601bb

Browse files
author
lukpueh
authored
Merge pull request #929 from lukpueh/rm-duplicate-role-schemas
Remove duplicate role-related schemas
2 parents b4e565f + c6ad8e3 commit be601bb

1 file changed

Lines changed: 0 additions & 20 deletions

File tree

tuf/formats.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,6 @@
163163
# A value that is either True or False, on or off, etc.
164164
BOOLEAN_SCHEMA = SCHEMA.Boolean()
165165

166-
# A string representing a role's name.
167-
ROLENAME_SCHEMA = SCHEMA.AnyString()
168-
169166
# A hexadecimal value in '23432df87ab..' format.
170167
HASH_SCHEMA = SCHEMA.RegularExpression(r'[a-fA-F0-9]+')
171168

@@ -216,23 +213,6 @@
216213
unknown_sigs = KEYIDS_SCHEMA,
217214
untrusted_sigs = KEYIDS_SCHEMA)
218215

219-
# Role object in {'keyids': [keydids..], 'name': 'ABC', 'threshold': 1,
220-
# 'paths':[filepaths..]} format.
221-
ROLE_SCHEMA = SCHEMA.Object(
222-
object_name = 'ROLE_SCHEMA',
223-
name = SCHEMA.Optional(ROLENAME_SCHEMA),
224-
keyids = KEYIDS_SCHEMA,
225-
threshold = THRESHOLD_SCHEMA,
226-
backtrack = SCHEMA.Optional(BOOLEAN_SCHEMA),
227-
paths = SCHEMA.Optional(RELPATHS_SCHEMA),
228-
path_hash_prefixes = SCHEMA.Optional(PATH_HASH_PREFIXES_SCHEMA))
229-
230-
# A dict of roles where the dict keys are role names and the dict values holding
231-
# the role data/information.
232-
ROLEDICT_SCHEMA = SCHEMA.DictOf(
233-
key_schema = ROLENAME_SCHEMA,
234-
value_schema = ROLE_SCHEMA)
235-
236216
# An integer representing length. Must be 0, or greater.
237217
LENGTH_SCHEMA = SCHEMA.Integer(lo=0)
238218

0 commit comments

Comments
 (0)