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

[api] expose repo configuration for easy repo consumption

      Goal:

      Return the full url to a snapshot along with each snapshot json.

       

      Acceptance Criteria:

      Today a snapshot returned contains the repository_path, but not the full url.

      we should add a new attribute 'url' that contains the full url to the snapshot.  This url will be made up of 3 pieces of information:

      a) the content server:  https://somehostname/
      b) the path prefix:   /pulp/content
      c) the path to the repo version   /abcd/efgh-ijkl/mnopq-srtvu/

      a & b can come from the pulp status call:

        "content_settings":

      {     "content_origin": "http://pulp_content:24816",     "content_path_prefix": "/pulp/content/"   }

      ,

      we will need to fetch that (and cache it in redis, can have a long life (hour)).

      c) already exists today on the snapshots model

      • In addition, lets add uuid to the snapshot response as well

       

      Also, add a new api endpoint:

      /api/content-sources/v1.0/repositories/$UUID/snapshots/$UUID/config.repo

      Thils would generate a repo config that looks like this:

      [$REPO_ID]
      name=$REPO_NAME
      baseurl=$SNAPSHOT_URL
      gpgcheck=0
      repo_gpgcheck=0
      enabled=1

       

      The $REPO_ID here needs to conform to yum repo id standard, we may have to do a name.replace(" ", "_")   or something to make it work on a  client

              rverdile@redhat.com Ryan Verdile
              rhn-engineering-jsherrill Justin Sherrill
              None
              None
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: