Source

awstools / scripts / ec2ssh

Full commit
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2012 Ludia Inc.
# This software is licensed as described in the file LICENSE, which
# you should have received as part of this distribution.
# Author: Pior Bastida <pbastida@socialludia.com>

import argparse
import argh

from awstools.commands import ec2ssh


epilog = """The 'instance' argument can be one or multiple specifiers
separated by commas.

valid specifiers:
    Private IP:             12.34.567.89
    Instance ID:            i-1a2b3c4d5e
    Tag Name (or altName):  tt-api-stage
    Wildcard on tag Name:   tt-api-*"""


parser = argh.ArghParser(
    epilog=epilog,
    formatter_class=argparse.RawDescriptionHelpFormatter
    )

argh.set_default_command(parser, ec2ssh.connect)

argh.dispatch(parser, completion=False)