-
Task
-
Resolution: Done
-
Undefined
-
None
Goal:
- To support our UIs here: https://www.sketch.com/s/b55e75a8-9a53-4eb0-989e-aad208521aba we need to
- Include the last snapshot for each repo in the repository list/show apis
- Include the added/removed counts for each snapshot in the snapshots api and the above addition to teh repository list/show apis
Acceptance Criteria:
- Get /repositories/UUID/snapshots should include a structure like this:
{ uuid: abcd-efgh, repository_path: /path/to/my/repo, content_counts: { rpm.package: 5 } added_counts: { rpm.package: 4 } removed_counts: { rpm.package 3 } }
Note that we already store content_counts, and added/removed comes from pulp very similarly, so it should be easy to add.
- get /repositories/ & get /repositories/UUID should also include the latest snapshot for each repo:
{ uuid: abcd-efgh name: "My repo" url: "http://example.com/repo/ last_snapshot: { uuid: abcd-efgh, repository_path: /path/to/my/repo, content_counts: { rpm.package: 5 } added_counts: { rpm.package: 4 } removed_counts: { rpm.package 3 } } }
We probably want to add 'latest_snapshot_uuid' to the repository_configs table to make this faster. When create a snapshot (in dao/snapshots.go Create(), we could just update the affected repository_config to point to the new snapshot.)