Refactor #1506
closedRemove _storage_path from ContentUnit definition
0%
Description
Currently platform has a ContentUnit and a FileContentUnit. When FileContentUnit was created, the "file" related attributes and methods were moved from ContentUnit to FileContentUnit except for the _storage_path field, which is now present on both. The _storage_path needs to be removed from ContentUnit definition, it doesn't belong there.
It was left there because removing it will take work. The attribute is defined on ContentUnit but never used; when accessed, it has the value None. Code in platform and many plugins rely on this behavior and things will break when it is removed since AttributeError will be raised. As another example, things like nodes don't make a distinction about content type so that may need a more significant fix than other areas.
This refactor includes both removing the field and updating the code which uses that field through the platform and plugins. Note the usage only needs to be done when the unit type is not a descendant of FileContentUnit. Only in those situations does the field removal matter since FileContentUnit provides _storage_path.
Updated by bmbouter about 5 years ago
- Status changed from NEW to CLOSED - WONTFIX
Updated by bmbouter about 5 years ago
Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.