mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
Revert "Begin renaming role names used in _type field"
This reverts commit 1c51ae173b.
This commit is contained in:
parent
b17b48456d
commit
d706025643
1 changed files with 9 additions and 9 deletions
|
|
@ -476,7 +476,7 @@
|
|||
# Root role: indicates root keys and top-level roles.
|
||||
ROOT_SCHEMA = SCHEMA.Object(
|
||||
object_name = 'ROOT_SCHEMA',
|
||||
_type = SCHEMA.String('root'),
|
||||
_type = SCHEMA.String('Root'),
|
||||
version = METADATAVERSION_SCHEMA,
|
||||
consistent_snapshot = BOOLEAN_SCHEMA,
|
||||
compression_algorithms = COMPRESSIONS_SCHEMA,
|
||||
|
|
@ -487,7 +487,7 @@
|
|||
# Targets role: Indicates targets and delegates target paths to other roles.
|
||||
TARGETS_SCHEMA = SCHEMA.Object(
|
||||
object_name = 'TARGETS_SCHEMA',
|
||||
_type = SCHEMA.String('targets'),
|
||||
_type = SCHEMA.String('Targets'),
|
||||
version = METADATAVERSION_SCHEMA,
|
||||
expires = ISO8601_DATETIME_SCHEMA,
|
||||
targets = FILEDICT_SCHEMA,
|
||||
|
|
@ -496,7 +496,7 @@
|
|||
# Snapshot role: indicates the latest versions of all metadata (except timestamp).
|
||||
SNAPSHOT_SCHEMA = SCHEMA.Object(
|
||||
object_name = 'SNAPSHOT_SCHEMA',
|
||||
_type = SCHEMA.String('snapshot'),
|
||||
_type = SCHEMA.String('Snapshot'),
|
||||
version = METADATAVERSION_SCHEMA,
|
||||
expires = ISO8601_DATETIME_SCHEMA,
|
||||
meta = FILEINFODICT_SCHEMA)
|
||||
|
|
@ -504,7 +504,7 @@
|
|||
# Timestamp role: indicates the latest version of the snapshot file.
|
||||
TIMESTAMP_SCHEMA = SCHEMA.Object(
|
||||
object_name = 'TIMESTAMP_SCHEMA',
|
||||
_type = SCHEMA.String('timestamp'),
|
||||
_type = SCHEMA.String('Timestamp'),
|
||||
version = METADATAVERSION_SCHEMA,
|
||||
expires = ISO8601_DATETIME_SCHEMA,
|
||||
meta = FILEDICT_SCHEMA)
|
||||
|
|
@ -543,7 +543,7 @@
|
|||
# serve.
|
||||
MIRRORLIST_SCHEMA = SCHEMA.Object(
|
||||
object_name = 'MIRRORLIST_SCHEMA',
|
||||
_type = SCHEMA.String('mirrors'),
|
||||
_type = SCHEMA.String('Mirrors'),
|
||||
version = METADATAVERSION_SCHEMA,
|
||||
expires = ISO8601_DATETIME_SCHEMA,
|
||||
mirrors = SCHEMA.ListOf(MIRROR_SCHEMA))
|
||||
|
|
@ -617,7 +617,7 @@ def from_metadata(object):
|
|||
|
||||
@staticmethod
|
||||
def make_metadata(version, expiration_date, filedict):
|
||||
result = {'_type' : 'timestamp'}
|
||||
result = {'_type' : 'Timestamp'}
|
||||
result['version'] = version
|
||||
result['expires'] = expiration_date
|
||||
result['meta'] = filedict
|
||||
|
|
@ -664,7 +664,7 @@ def from_metadata(object):
|
|||
@staticmethod
|
||||
def make_metadata(version, expiration_date, keydict, roledict,
|
||||
consistent_snapshot, compression_algorithms):
|
||||
result = {'_type' : 'root'}
|
||||
result = {'_type' : 'Root'}
|
||||
result['version'] = version
|
||||
result['expires'] = expiration_date
|
||||
result['keys'] = keydict
|
||||
|
|
@ -705,7 +705,7 @@ def from_metadata(object):
|
|||
|
||||
@staticmethod
|
||||
def make_metadata(version, expiration_date, versiondict):
|
||||
result = {'_type' : 'snapshot'}
|
||||
result = {'_type' : 'Snapshot'}
|
||||
result['version'] = version
|
||||
result['expires'] = expiration_date
|
||||
result['meta'] = versiondict
|
||||
|
|
@ -752,7 +752,7 @@ def make_metadata(version, expiration_date, filedict=None, delegations=None):
|
|||
if filedict is None and delegations is None:
|
||||
raise tuf.Error('We don\'t allow completely empty targets metadata.')
|
||||
|
||||
result = {'_type' : 'targets'}
|
||||
result = {'_type' : 'Targets'}
|
||||
result['version'] = version
|
||||
result['expires'] = expiration_date
|
||||
result['targets'] = {}
|
||||
|
|
|
|||
Loading…
Reference in a new issue