Project

Profile

Help

Task #2917

Updated by bmbouter over 6 years ago

The following kwargs should objects in pulpcore.plugin.changeset do not take all options used as keyword arguments. This requires you to instantiate them and then bind data to them which is not typical. 

 For example look at the Python standard library. It's very uncommon for an option to be added bound post instantiation, especially as the only way to have the plugin API constructors: programmer provide that data. You can also see a library like 'requests' or 'celery' which has all arguments passed it at instantiation time. 

 <pre> 
 pulpcore.plugin.changeset.main.ChangeSet(self, importer, additions=(), removals=(), deferred=False):    # adds 'deferred' 

 pulpcore.plugin.changeset.model.Remote(self, model, settled=False):    # adds 'settled' 
 pulpcore.plugin.changeset.model.RemoteContent(self, model, artifacts=set()):    # adds 'artifacts' 
 pulpcore.plugin.changeset.model.RemoteArtifact(self, model, download, content=None, path=None):    # adds 'content' and 'path' 

 pulpcore.plugin.changeset.report.ChangeReport(self, action, content, error=None):    # adds 'error' 

 pulpcore.plugin.download.HttpDownload(self, url, writer, method='GET', timeout=None, user=None, ssl=None, proxy_url=None, headers={}):    # adds 'timeout', 'user', 'ssl', 'proxy_url', and 'headers' 
 pulpcore.plugin.download.FileDownload(self, url, writer, user=None):    # adds 'user' 

 pulpcore.plugin.download.Batch(self, downloads, concurrent=CONCURRENT, backlog=BACKLOG, iterator=None, context=None, feeder=None, is_shutdown=False):    # adds 'iterator', 'context', 'feeder', and 'batch' 
 </pre> Any attribute that isn't always known as instantiation time should remain able to be set at instantiation or later, but I'm not sure if any of these attributes need that. If there are any cases like that it would be great to identify those on this issue.

Back