inconsistent positional arguments in InternalClient
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Confirmed
|
Low
|
Unassigned |
Bug Description
The signature for InternalClient get_object and a few others is reasonable:
def get_object(self, account, container, obj, headers,
def iter_object_lines(
self, account, container, obj, headers=None,
def create_container(
self, account, container, headers=None, acceptable_
the pattern is (self, *aco, headers, acceptable_
the set_*_metadata method introduces a new concept of questionable utility:
def set_container_
self, account, container, metadata, metadata_prefix='',
def set_object_
self, account, container, obj, metadata,
But still, with the default metadata_prefix='', the implementation ends up following the "normal" signature (i.e. the metadata arg ends up being just headers sent along with the request)
This IMHO makes get_object_metadata stick out like a sore thumb:
def get_object_
self, account, container, obj, metadata_prefix='',
And indeed calling it like get_object, i.e.
my_internal_
Does in fact smash your thumb with hammer.
Changed in swift: | |
status: | New → Confirmed |
importance: | Undecided → Low |