Project

Profile

Help

Story #3209

Updated by bmbouter over 6 years ago

h2. Motivation 

 The ContentUnits added This feature enables Pulp users to a track repository change over time, but Pulp only stores the current state. This prevents a lot of great things like rolling back to a particluar snapshot, or understanding exactly what content is in place at any given time. 

 h2. Solution 

 Introducing the Repository Version, which represents the ContentUnits in a sets as repository after any given operation. For example, each of the following operations will produce a versions. A repository version. 

 * Sync from version represents an importer 
 * Add a immutable set of units to a content. A new repository 
 * Remove a version is created every time the set of units content changes. New repository versions are created by syncing content using an importer and by specifying which content to add or remove from a the previous repository 

 version. Any repository version can be deleted. Publications are changed Any repository version can be used to publish create a specific RepositoryVersion, not just the latest content in publication. Each publication can be distributed at a given repo. 

 h2. API examples 

 <pre> 
 GET /api/v3/repository/{repo_id}/versions/{number}    # The resource for unique URL. As a single repo version 
 GET /api/v3/repositories/{repo_id}/versions/<id>/content/    # paginated list of all result, content in particular version 
 GET /api/v3/repositories/{repo_id}/versions/<id>/added_content/    # paginated list of content added when a particular version was created 
 GET /api/v3/repositories/{repo_id}/versions/<id>/removed_content/    # paginated list of content removed when a particular version was created 
 </pre> 
 consumers can access multiple repository versions at the same time.

Back