starcluster.commands.showconsole

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

# Source Code for Module starcluster.commands.showconsole

     1  #!/usr/bin/env python
     2
     3  from completers import InstanceCompleter
     4
     5
     6 -class CmdShowConsole(InstanceCompleter):
     7      """
     8      showconsole <instance-id>
     9
    10      Show console output for an EC2 instance
    11
    12      Example:
    13
    14          $ starcluster showconsole i-999999
    15
    16      This will display the startup logs for instance i-999999
    17      """
    18      names = ['showconsole', 'sc']
    19
    20 -    def execute(self, args):
    21          if not len(args) == 1:
    22              self.parser.error('please provide an instance id')
    23          instance_id = args[0]
    24          self.ec2.show_console_output(instance_id)
    25