Project

Profile

Help

Story #8205

closed

Add AnsibleCollectionDeprecated resource to export/import

Added by gerrod almost 4 years ago. Updated about 3 years ago.

Status:
MODIFIED
Priority:
Normal
Assignee:
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Katello
Sprint:
Quarter:

Description

The Two Related Problem

  1. The 'deprecated' data is mutable.
  2. The 'deprecated' data is not correctly included in import/export data

Solution

From a high level, make the AnsibleCollectionDeprecated content.

Modeling

Here are the rough steps involved:

  1. switch the existing AnsibleCollectionDeprecated to inherit from Content
  2. Remove the repository_version FK entirely.
  3. Change the collection field to be a string with the collection name instead
  4. Add a string field called namespace.
  5. The uniqueness constraint should be the tuple "namespace", "collection_name"

Sync Implementation

The sync code will continue to parse the deprecated data in FirstStage in the same way, but instead of saving/managing them in first-stage, have the stages pipeline handle it all by making AnsibleCollectionDeprecated in-memory and associating with a declarative content object.

The Galaxy API viewset

Port this portion to look for the objects in the set of content of the RepositoryVersion.

The viewset for set/unset deprecation handling

Port this portion to generate a task that creates a RepositoryVersion

Additional work needed to get this working with Import/Export

Add a model to model resources: https://github.com/pulp/pulp_ansible/blob/master/pulp_ansible/app/modelresource.py


Related issues

Blocked by Pulp - Task #8204: Add method to allow import of models with references to repo versionsCLOSED - DUPLICATE

Actions

Also available in: Atom PDF