[Pulp-dev] How to list orphan content in pulp3 before remocing them ?
ggainey at redhat.com
Mon Jan 31 12:28:56 UTC 2022
The following dumps all the Content-objects that are orphaned (ie, "not
assigned to a repository and not touched in the last
"minutes_since_touched" minutes). Needs some expansion, but that depends on
what you want to get out of it. Artifact checksums? Content "name"
(whatever that means)? UUIDs?
$ pulpcore-manager shell
from pulpcore.app.models.content import Content
minutes_since_touched = 1
<BulkTouchQuerySet [<Content (pulp_type=rpm.packagelangpacks):
(pulp_type=rpm.packagegroup): shark>, <Content
(pulp_type=rpm.packagecategory): all>, <Content
On Mon, Jan 31, 2022 at 3:33 AM Sayan Das <saydas at redhat.com> wrote:
> Hello All,
> I hope everyone is doing great.
> I am reaching out to the developers here as I wanted to find out *How I
> can list all orphan contents in Pulp 3* before deleting them?
> I have checked in Pulpcore API as well as Pulp cli but The only option I
> see is to remove the orphan contents directly.
> There are many situations where due to customer demand or our own
> understanding we may need to understand what all orphan data is present
> before we clear them up.
> Keeping that in mind, can anyone please suggest or confirm if we have any
> way to simply list the orphan content details in Pulp 3 similar to how we
> were able to do with Pulp 2?
> Thanks & Regards,
> Sayan das
> *S*enior* T*echnical *S*upport *E*ngineer, RHCE
> Red Hat India
> Red Hat India Pvt. Ltd, Level-5, Tower-10, Cyber City
> Magarpatta City Hadapsar, Pune-411013, Maharashtra, India.
> saydas at redhat.com M: +91-7890892756 IRC: Sayan
> Pulp-dev mailing list
> Pulp-dev at redhat.com
Principal Software Engineer, Red Hat System Management Engineering
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pulp-dev