Add AnsibleCollectionDeprecated resource to export/import
The Two Related Problem¶
- The 'deprecated' data is mutable.
- The 'deprecated' data is not correctly included in import/export data
From a high level, make the
Here are the rough steps involved:
- switch the existing AnsibleCollectionDeprecated to inherit from Content
- Remove the
- Change the
collectionfield to be a string with the collection name instead
- Add a string field called namespace.
- The uniqueness constraint should be the tuple "namespace", "collection_name"
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
#5 Updated by daviddavis 4 months ago
Change the collection field to be a string with the collection name instead
I'm assuming this will contain namespace? Or we have to add another field for namespace?
Additional work needed to get this working with Import/Export
We just need to add a model to model resources: https://github.com/pulp/pulp_ansible/blob/master/pulp_ansible/app/modelresource.py
the first issue I found is the data migration, AnsibleCollectionDeprecated as content would change the repository versions.
AnsibleCollectionDeprecated( collection=Collection(name="pulp_installer", namespace="pulp"), repository_version=RepositoryVersion(number=1), )
AnsibleCollectionDeprecated( name="pulp_installer", namespace="pulp", ) + RepositoryContent
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulp_ansible|b20ce5170066cdbc32ea80c5c65060befdc9031a.
Please register to edit this issue