I noticed that when a delete by asset is done on a yum hosted repository that it also deletes the component, this in turn will delete the remaining assets of the component.
- Upload two rpms for different architectures, I used bakefile from http://mirror.centos.org/centos/6/extras/i386/Packages/bakefile-0.2.8-3.el6.centos.i686.rpm and http://mirror.centos.org/centos/6/extras/x86_64/Packages/bakefile-0.2.8-3.el6.centos.x86_64.rpm
- Use the rest api to perform a search: http://localhost:8081/service/rest/beta/search?repository=yum-hosted&format=yum&name=bakefile&version=0.2.8-3.el6.centos will return something similar to the response shown below, i.e. one component containing two assets.
- Use one of the assets id value to issue a delete http://localhost:8081/service/rest/beta/assets/eXVtLWhvc3RlZDoyZmZmNTA5YTdjMmE5ZWJlMjI1MmIxNTY5OWI3MzdjYg
- Perform the same search as in step 1
- Observe that the component and all rpms have now been deleted.
- delete by asset should not delete the component when other assets are associated with the component.
- delete by component should delete itself and all associated assets.