Project

Profile

Help

Task #3704

Updated by bmbouter over 6 years ago

h3. Motivations Per convo on pulp-dev: https://www.redhat.com/archives/pulp-dev/2018-May/msg00128.html 

 1. Avoiding attribute naming collisions when content writer's subclass Content. 

 2. Allow users This task is to easily see which attributes are from pulpcore and therefore common to all content types. 

 h3. Changes 

 Rename rename the MasterModel fields "here":https://github.com/pulp/pulp/blob/d1dc089890f167617fe9917af087d5587708296b/pulpcore/pulpcore/app/models/base.py#L25-L27 in the following ways: 

 created -> _created 
 id -> _id 
 last_updated -> _last_updated 

 Also for the "Content model itself":https://github.com/pulp/pulp/blob/f9707edde3201e61a454efc395ad2d3e3d628f9b/pulpcore/pulpcore/app/models/content.py#L117-L118 

 notes -> _notes 
 artifacts -> _artifacts 


 h3. Details 

 After making ^ change, go through pulp/pulp and update any references to the old field names. Once Pulp-smash passes w/ the new field names, you're done. 

 This will be a backwards incompatible Beta change for both plugin writers and users. As such, the PR needs the 'breaking-changes', 'rest-API', and 'plugin-writer' labels.

Back