starcluster.commands.listspots

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

# Source Code for Module starcluster.commands.listspots

     1  #!/usr/bin/env python
     2
     3  from base import CmdBase
     4
     5
     6 -class CmdListSpots(CmdBase):
     7      """
     8      listspots
     9
    10      List all EC2 spot instance requests
    11      """
    12      names = ['listspots', 'ls']
    13
    14 -    def addopts(self, parser):
    15          parser.add_option("-c", "--show-closed", dest="show_closed",
    16                            action="store_true", default=False,
    17                            help="show closed/cancelled spot instance requests")
    18
    19 -    def execute(self, args):
    20          self.ec2.list_all_spot_instances(self.opts.show_closed)
    21