starcluster.commands.listzones

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

# Source Code for Module starcluster.commands.listzones

     1  #!/usr/bin/env python
     2
     3  from base import CmdBase
     4
     5
     6 -class CmdListZones(CmdBase):
     7      """
     8      listzones
     9
    10      List all EC2 availability zones in the current region (default: us-east-1)
    11      """
    12      names = ['listzones', 'lz']
    13
    14 -    def addopts(self, parser):
    15          parser.add_option("-r", "--region", dest="region", default=None,
    16                            help="Show all zones in a given region " + \
    17                            "(see listregions)")
    18
    19 -    def execute(self, args):
    20          self.ec2.list_zones(region=self.opts.region)
    21