Skip to content

Commit

Permalink
warehouse: Delete tuf.models, use tuf.repository config for CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
woodruffw committed Apr 6, 2020
1 parent 26ca58a commit f8e7d67
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 80 deletions.
10 changes: 7 additions & 3 deletions warehouse/cli/tuf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from warehouse.cli import warehouse
from warehouse.tuf import BIN_N_ROLE, BINS_ROLE, TOPLEVEL_ROLES, utils

TUF_REPO = "warehouse/tuf/dist"
# TUF_REPO = "warehouse/tuf/dist"


def _make_backsigned_fileinfo_from_file(file):
Expand Down Expand Up @@ -59,7 +59,9 @@ def new_repo(config):
Initialize the TUF repository from scratch, including a brand new root.
"""

repository = repository_tool.create_new_repository(TUF_REPO)
repository = repository_tool.create_new_repository(
config.registry.settings["tuf.repository"]
)

for role in TOPLEVEL_ROLES:
key_service = _key_service_for_role(config, role)
Expand Down Expand Up @@ -94,7 +96,9 @@ def build_targets(config):
targets role (bins) and its hashed bin delegations (each bin-n).
"""

repository = repository_tool.load_repository(TUF_REPO)
repository = repository_tool.load_repository(
config.registry.settings["tuf.repository"]
)

# Load signing keys. We do this upfront for the top-level roles.
for role in ["snapshot", "targets", "timestamp"]:
Expand Down
77 changes: 0 additions & 77 deletions warehouse/tuf/models.py

This file was deleted.

0 comments on commit f8e7d67

Please sign in to comment.