Project

Profile

Help

Story #5344

Updated by dalley over 3 years ago

Problem: 

 API design for copy and upload has thus far been somewhat haphazard and it would be useful to make it more consistent.    Additionally there are some deficiencies in some of the current APIs that need to be addressed. 

 For example: 

 [Case 1] 

 The copy API currently looks something like this 

 +copy api+ 

 The current copy API looks something like this. 

 <pre> 
 POST /pulp/api/v3/rpm/copy/ types=['package', 'modulemd'] 
 </pre> 

 The problem with this API is that it will be difficult to make it play nicely with filtering, which has yet to be implemented.    The filtering use case is essentially "copy units for which metadata matches these filters, e.g. name=walrus and version>1.1.0".    However, because different unit types have different metadata fields, allowing the user to specify filters while also allowing more than one type of content to be copied at once would be problematic because there's no good way to determine what filters should apply to what content types.    Possibly it could be done, but it would probably not be a good idea.    Therefore it is probably best that the "types" parameter be removed entirely. 

 In various discussions we've mentioned the utility (and possibly necessity) of being able to have a group of tasks that are atomic and transactional together.    Something like this could be applied here in order to fill the use case of copying multiple content types in one sync. 

 [Case 2] 

Back