starcluster.commands.showbucket

Package starcluster :: Package commands :: Module showbucket |
[hide private]
[frames] | no frames]

# Source Code for Module starcluster.commands.showbucket

     1  #!/usr/bin/env python
     2
     3  from base import CmdBase
     4
     5
     6 -class CmdShowBucket(CmdBase):
     7      """
     8      showbucket <bucket>
     9
    10      Show all files in an S3 bucket
    11
    12      Example:
    13
    14          $ starcluster showbucket mybucket
    15      """
    16      names = ['showbucket', 'sb']
    17
    18 -    def execute(self, args):
    19          if not args:
    20              self.parser.error('please specify an S3 bucket')
    21          for arg in args:
    22              self.s3.list_bucket(arg)
    23