Skip to content

metadata API: Constants for top-level rolenames #1648

Closed

Description

@lukpueh

Description of issue or feature request:

Top-level role names - "root", "timestamp", "snapshot" and "targets" - are hardcoded throughout the code base. Good coding practice suggests to create constants for these and use them instead.

See

grep -rE  [\"\']\(root\|targets\|snapshot\|timestamp\)[\"\'] tuf/api/ tuf/ngclient/

Current behavior:

  • Top-level role names are hardcoded

Expected behavior:

  • Constants for top-level role names are defined in tuf/api/metadata.py and
  • Constants are used in TUF 1.0-bound code, that is at least in tuf/api/* and tuf/ngclient/* and probably any new test modules.

Activity

  1. added
    good first issue
    on Oct 28, 2021
  2. added
    backlog
    on Nov 10, 2021
  3. ivanayov commented on Nov 11, 2021

    @ivanayov
    Collaborator

    I'd like to work on that, please.

  4. added this to the Sprint 13 milestone on Nov 24, 2021
  5. added 4 commits that reference this issue on Nov 25, 2021
    b992bb9
    1c0c253
    d7c6534
    00589f0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

backloggood first issue

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions