Revision 6d190dd1 kamaki/cli/commands/pithos.py
b/kamaki/cli/commands/pithos.py | ||
---|---|---|
46 | 46 |
from kamaki.cli.argument import ProgressBarArgument |
47 | 47 |
from kamaki.cli.commands import _command_init, errors |
48 | 48 |
from kamaki.cli.commands import addLogSettings, DontRaiseKeyError |
49 |
from kamaki.cli.commands import _optional_output_cmd, _optional_json |
|
49 |
from kamaki.cli.commands import ( |
|
50 |
_optional_output_cmd, _optional_json, _name_filter) |
|
50 | 51 |
from kamaki.clients.pithos import PithosClient, ClientError |
51 | 52 |
from kamaki.clients.astakos import AstakosClient |
52 | 53 |
|
... | ... | |
326 | 327 |
|
327 | 328 |
|
328 | 329 |
@command(pithos_cmds) |
329 |
class file_list(_file_container_command, _optional_json): |
|
330 |
class file_list(_file_container_command, _optional_json, _name_filter):
|
|
330 | 331 |
"""List containers, object trees or objects in a directory |
331 | 332 |
Use with: |
332 | 333 |
1 no parameters : containers in current account |
... | ... | |
439 | 440 |
if_unmodified_since=self['if_unmodified_since'], |
440 | 441 |
until=self['until'], |
441 | 442 |
show_only_shared=self['shared']) |
442 |
self._print(r.json, self.print_containers) |
|
443 |
files = self._filter_by_name(r.json) |
|
444 |
self._print(files, self.print_containers) |
|
443 | 445 |
else: |
444 |
prefix = self.path or self['prefix'] |
|
446 |
prefix = self.path or self['prefix'] or self['name_prefix']
|
|
445 | 447 |
r = self.client.container_get( |
446 | 448 |
limit=False if self['more'] else self['limit'], |
447 | 449 |
marker=self['marker'], |
... | ... | |
453 | 455 |
until=self['until'], |
454 | 456 |
meta=self['meta'], |
455 | 457 |
show_only_shared=self['shared']) |
456 |
self._print(r.json, self.print_objects) |
|
458 |
files = self._filter_by_name(r.json) |
|
459 |
self._print(files, self.print_objects) |
|
457 | 460 |
|
458 | 461 |
def main(self, container____path__=None): |
459 | 462 |
super(self.__class__, self)._run(container____path__) |
Also available in: Unified diff