Revision cb69c154 pithos/backends/base.py

b/pithos/backends/base.py
73 73
        """
74 74
        return []
75 75
    
76
    def get_account_meta(self, user, account, until=None):
77
        """Return a dictionary with the account metadata.
76
    def get_account_meta(self, user, account, domain, until=None):
77
        """Return a dictionary with the account metadata for the domain.
78 78
        
79 79
        The keys returned are all user-defined, except:
80 80
            'name': The account name
......
92 92
        """
93 93
        return {}
94 94
    
95
    def update_account_meta(self, user, account, meta, replace=False):
96
        """Update the metadata associated with the account.
95
    def update_account_meta(self, user, account, domain, meta, replace=False):
96
        """Update the metadata associated with the account for the domain.
97 97
        
98 98
        Parameters:
99
            'domain': Metadata domain
100
            
99 101
            'meta': Dictionary with metadata to update
100 102
            
101 103
            'replace': Replace instead of update
......
182 184
        """
183 185
        return []
184 186
    
185
    def get_container_meta(self, user, account, container, until=None):
186
        """Return a dictionary with the container metadata.
187
    def get_container_meta(self, user, account, container, domain, until=None):
188
        """Return a dictionary with the container metadata for the domain.
187 189
        
188 190
        The keys returned are all user-defined, except:
189 191
            'name': The container name
......
203 205
        """
204 206
        return {}
205 207
    
206
    def update_container_meta(self, user, account, container, meta, replace=False):
207
        """Update the metadata associated with the container.
208
    def update_container_meta(self, user, account, container, domain, meta, replace=False):
209
        """Update the metadata associated with the container for the domain.
208 210
        
209 211
        Parameters:
212
            'domain': Metadata domain
213
            
210 214
            'meta': Dictionary with metadata to update
211 215
            
212 216
            'replace': Replace instead of update
......
269 273
        """
270 274
        return
271 275
    
272
    def list_objects(self, user, account, container, prefix='', delimiter=None, marker=None, limit=10000, virtual=True, keys=[], shared=False, until=None):
276
    def list_objects(self, user, account, container, prefix='', delimiter=None, marker=None, limit=10000, virtual=True, domain=None, keys=[], shared=False, until=None):
273 277
        """Return a list of object (name, version_id) tuples existing under a container.
274 278
        
275 279
        Parameters:
......
287 291
                       If set, the result will include all names after 'prefix',
288 292
                       up to and including the 'delimiter' if it is found
289 293
            
294
            'domain': Metadata domain for keys
295
            
290 296
            'keys': Include objects that satisfy the key queries in the list.
291 297
                    Use 'key', '!key' for existence queries, 'key op value' for
292 298
                    value queries, where 'op' can be one of =, !=, <=, >=, <, >
......
300 306
        """
301 307
        return []
302 308
    
303
    def list_object_meta(self, user, account, container, until=None):
304
        """Return a list with all the container's object meta keys.
309
    def list_object_meta(self, user, account, container, domain, until=None):
310
        """Return a list with all the container's object meta keys for the domain.
305 311
        
306 312
        Raises:
307 313
            NotAllowedError: Operation not permitted
......
310 316
        """
311 317
        return []
312 318
    
313
    def get_object_meta(self, user, account, container, name, version=None):
314
        """Return a dictionary with the object metadata.
319
    def get_object_meta(self, user, account, container, name, domain, version=None):
320
        """Return a dictionary with the object metadata for the domain.
315 321
        
316 322
        The keys returned are all user-defined, except:
317 323
            'name': The object name
......
337 343
        """
338 344
        return {}
339 345
    
340
    def update_object_meta(self, user, account, container, name, meta, replace=False):
341
        """Update the metadata associated with the object and return the new version.
346
    def update_object_meta(self, user, account, container, name, domain, meta, replace=False):
347
        """Update the metadata associated with the object for the domain and return the new version.
342 348
        
343 349
        Parameters:
350
            'domain': Metadata domain
351
            
344 352
            'meta': Dictionary with metadata to update
345 353
            
346 354
            'replace': Replace instead of update
......
424 432
        """
425 433
        return 0, []
426 434
    
427
    def update_object_hashmap(self, user, account, container, name, size, hashmap, meta={}, replace_meta=False, permissions=None):
435
    def update_object_hashmap(self, user, account, container, name, size, hashmap, domain, meta={}, replace_meta=False, permissions=None):
428 436
        """Create/update an object with the specified size and partial hashes and return the new version.
429 437
        
430 438
        Parameters:
431
            'dest_meta': Dictionary with metadata to change
439
            'domain': Metadata domain
440
            
441
            'meta': Dictionary with metadata to change
432 442
            
433 443
            'replace_meta': Replace metadata instead of update
434 444
            
......
447 457
        """
448 458
        return ''
449 459
    
450
    def copy_object(self, user, src_account, src_container, src_name, dest_account, dest_container, dest_name, dest_meta={}, replace_meta=False, permissions=None, src_version=None):
460
    def copy_object(self, user, src_account, src_container, src_name, dest_account, dest_container, dest_name, domain, meta={}, replace_meta=False, permissions=None, src_version=None):
451 461
        """Copy an object's data and metadata and return the new version.
452 462
        
453 463
        Parameters:
454
            'dest_meta': Dictionary with metadata to change from source to destination
464
            'domain': Metadata domain
465
            
466
            'meta': Dictionary with metadata to change from source to destination
455 467
            
456 468
            'replace_meta': Replace metadata instead of update
457 469
            
......
474 486
        """
475 487
        return ''
476 488
    
477
    def move_object(self, user, src_account, src_container, src_name, dest_account, dest_container, dest_name, dest_meta={}, replace_meta=False, permissions=None):
489
    def move_object(self, user, src_account, src_container, src_name, dest_account, dest_container, dest_name, domain, meta={}, replace_meta=False, permissions=None):
478 490
        """Move an object's data and metadata and return the new version.
479 491
        
480 492
        Parameters:
481
            'dest_meta': Dictionary with metadata to change from source to destination
493
            'domain': Metadata domain
494
            
495
            'meta': Dictionary with metadata to change from source to destination
482 496
            
483 497
            'replace_meta': Replace metadata instead of update
484 498
            

Also available in: Unified diff