# comps.xml create in pulp_rpm [9225](https://pulp.plan.io/issues/9225) Four Content models contained in comps.xml: * PackageCategory * PackageEnvironment * PackageGroup * PackageLangpack Cannot create/delete any of these independently, only list/show them. Unlike moduledmd/modulemd_default, comps.xml **does not exist** until a Publication is created. It is built from the contents of the Package[Category|Environment|Group|Langpack] associated with the repo-version being published. Major use case: there exists a comps.xml for a repository. I need to upload it. Implications: * Need an "upload a comps.xml" API, takes a file. * Api needs to parse/validate the comps.xml * Api needs to create the Content models above, from the comps.xml * Api/task needs to return the pulp_hrefs for the created entities In this case, user would need to grab the resulting HREFs and use repository-content-modify.add to add them. AND/OR * also accept 'repository' href * Create Content models and add them to a new repo-version for the specified repo on -the-fly * Task returns content-hrefs and new version-href What does Pulp2 do? Thoughts In My Brain * Is it worth making the four Content objects "first class" (ie, add create/update/delete) for all of them? * Can you ask the API for a compls.xml and get it back? What does Pulp2 do? * create each of the models * upload comps.xml directly * See * https://docs.pulpproject.org/en/2.21/plugins/pulp_rpm/user-guide/recipes.html#package-groups * https://docs.pulpproject.org/en/2.21/plugins/pulp_rpm/user-guide/recipes.html#package-categories * https://docs.pulpproject.org/en/2.21/plugins/pulp_rpm/user-guide/recipes.html#package-environments * https://docs.pulpproject.org/en/2.21/plugins/pulp_rpm/user-guide/recipes.html#package-langpacks * https://docs.pulpproject.org/en/2.21/plugins/pulp_rpm/user-guide/recipes.html#comps