Uploaded image for project: 'Insights Experiences'
  1. Insights Experiences
  2. HMS-2188

Api - Add more detail in snapshot listing, and include most recent snapshot for each repository

      Goal: 

      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.)

              rhn-engineering-adewar Andrew Dewar
              rhn-engineering-jsherrill Justin Sherrill
              Stephen Wadeley Stephen Wadeley
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: