I hope you all are ok.
I am in the process of automating some processes within my company relying on ePO APIs (using python calls).
Although I have already achieved some things such as: check in packages, replicate them and manage systems among others, I am struggling to remove X packages from the different ePO branches within Master Repository.
Mainly, I would like to remove all the packages located in a specific branch so I can remove for example all the packages located in the Evaluation branch.
I know that there is a function called repository.deletePackage (productId, packageType, branch), however how do I remove the packages without knowing neither productid nor packageType?
Does anyone know how I can achieve that? a workaound?
Any help would be much appreciated.
This is such a specific question that i think no one here will be able to help you, or at least it will take some time.
Do you just want to delete all stuff from a specific branch once? or are you going to lets say create a task that deletes the whole evaluate-branch once a month?
Maybe you try to contact McAfee-support and ask them for guidance?
Okay maybe the repositroy.pull option will help you out:
repository.pull sourceRepository targetBranch moveToPrevious productList
Pull packages from the source site
Requires full permission for the Master Repository
sourceRepository (param 1) - Source repository name
targetBranch (param 2) - Target branch name, must be "Current" or "Previous" or "Evaluation"
moveToPrevious (param 3) - If true, existing package will be moved to Previous branch. Defaults to false.
productList (param 4) - List of product IDs separated by comma
You need to run an SQL-query to list the elements for a specific branch export these to an XML or CSV file and use this a source for your script to delete them.