Ticket #2197 (assigned defect)
Storage Metadata API: add/update not working with local file storage (Pairtree)
Reported by: | zydio | Owned by: | |
---|---|---|---|
Priority: | awaiting triage | Milestone: | ckan-backlog |
Component: | ckan | Keywords: | storage ckanext-storage |
Cc: | Repository: | ckan | |
Theme: | none |
Description
If OFS is configured with Pairtree to use a local file storage, all POST requests to add/update metadata ( /api/storage/metadata/{label} ) will fail.
This is due to the use of BotoOFS specific private methods in StorageAPIController.set_metadata(), eg: self.ofs._require_bucket(bucket), self.ofs._get_key(b, label), self.ofs._update_key_metadata(k, metadata) ... those methods can't be found in POTFS and this causes errors. The API should use only OFSInterface methods, or should conditionally make calls based off the actual type of self.ofs.
PS: I did set "ckan" as "Component" in the ticket because storage has been integrated back into the core in CKAN 1.6