예제 #1
0
def main():
    parser = argparse.ArgumentParser(description=DESCRIPTION)
    parser.add_argument('-a', '--access-key-id')
    parser.add_argument('-s', '--secret-key')
    parser.add_argument('-f', '--force',
        dest='force',
        default=False,
        action='store_true',
        help="force the creation of a new image, deregistering any exising " \
             "image with the same name"
    )
    parser.add_argument('-c', '--no-clean',
        dest='clean',
        default=True,
        action='store_false',
        help="skip final cleanup phase, leaving the virtualization resources " \
             "in place and the instance running for further manual access"
    )
    parser.add_argument('-m', '--manual',
        dest='manual',
        default=False,
        action='store_true',
        help="perform basic setup and then wait for the user to configure " \
             "the machine manually before continuing"
    )
    parser.add_argument('-v',
                        '--version',
                        action='version',
                        version='%(prog)s ' + VERSION)
    parser.add_argument('setup',
                        metavar='configuration-file',
                        type=argparse.FileType('r'))

    return shell.main(parser, master)
예제 #2
0
def main():
    parser = argparse.ArgumentParser(description=DESCRIPTION)
    parser.add_argument('-a', '--access-key-id')
    parser.add_argument('-s', '--secret-key')
    parser.add_argument('-f', '--force',
        dest='force',
        default=False,
        action='store_true',
        help="force the creation of a new image, deregistering any exising " \
             "image with the same name"
    )
    parser.add_argument('-c', '--no-clean',
        dest='clean',
        default=True,
        action='store_false',
        help="skip final cleanup phase, leaving the virtualization resources " \
             "in place and the instance running for further manual access"
    )
    parser.add_argument('-m', '--manual',
        dest='manual',
        default=False,
        action='store_true',
        help="perform basic setup and then wait for the user to configure " \
             "the machine manually before continuing"
    )
    parser.add_argument('-v', '--version',
        action='version',
        version='%(prog)s ' + VERSION
    )
    parser.add_argument('setup',
        metavar='configuration-file',
        type=argparse.FileType('r')
    )

    return shell.main(parser, master)
예제 #3
0
def main():
    parser = argparse.ArgumentParser(description=DESCRIPTION)

    group = parser.add_mutually_exclusive_group(required=True)
    group.add_argument(
        '-c',
        '--configuration-file',
        dest='setup',
        type=argparse.FileType('r'),
    )
    group.add_argument('-C', '--clean-all',
        dest='clean',
        default=False,
        action='store_true',
        help="cleans all security groups and key pairs whose name starts with"\
             " 'pop-'",
    )

    parser.add_argument('-a', '--access-key-id')
    parser.add_argument('-s', '--secret-key')
    parser.add_argument('-v',
                        '--version',
                        action='version',
                        version='%(prog)s ' + VERSION)

    return shell.main(parser, destroy)
예제 #4
0
파일: setup.py 프로젝트: GaretJax/pop-utils
def main():
    parser = argparse.ArgumentParser(description=DESCRIPTION)
    parser.add_argument('--version', action='version',
                        version='%(prog)s ' + VERSION)
    parser.add_argument('-a', '--access-key-id')
    parser.add_argument('-s', '--secret-key')
    parser.add_argument('setup', metavar='configuration-file',
                        type=argparse.FileType('r'))

    return shell.main(parser, setup)
예제 #5
0
def main():
    parser = argparse.ArgumentParser(description=DESCRIPTION)

    group = parser.add_mutually_exclusive_group(required=True)
    group.add_argument(
        '-c',
        '--configuration-file',
        dest='setup',
        type=argparse.FileType('r'),
    )
    group.add_argument('-C', '--clean-all',
        dest='clean',
        default=False,
        action='store_true',
        help="cleans all security groups and key pairs whose name starts with"\
             " 'pop-'",
    )

    parser.add_argument('-a', '--access-key-id')
    parser.add_argument('-s', '--secret-key')
    parser.add_argument(
        '-v', '--version', action='version', version='%(prog)s ' + VERSION)

    return shell.main(parser, destroy)