Exemple #1
0
def initialize_parser(subparsers):
    parser = subparsers.add_parser('export', help='Export Box to a folder')

    add_standard_argument(parser, BOXES_PATH_ARG)
    add_standard_argument(parser, RECURSIVE_ARG)
    parser.add_argument(dest='box_id', metavar='box-id', help='ID of the Box to export')
    parser.set_defaults(func=execute_command)
Exemple #2
0
def initialize_parser(subparsers):
    parser = subparsers.add_parser('export-instance',
                                   help='Export Instace boxes to a folder')

    add_standard_argument(parser, BOXES_PATH_ARG)
    parser.add_argument(dest='instance_id',
                        metavar='instance-id',
                        help='ID of the Instance to export')
    parser.set_defaults(func=execute_command)
Exemple #3
0
def initialize_parser(subparsers):
    parser = subparsers.add_parser(
        'build', help='Build container for the specified box')

    ebcli.add_standard_argument(parser, ebcli.IMAGE_ARG)
    ebcli.add_standard_argument(parser, ebcli.BOXES_PATH_ARG)
    parser.add_argument(dest='box_id')
    parser.add_argument('--dockerfile',
                        type=argparse.FileType('w'),
                        default=sys.stdout)

    parser.set_defaults(func=execute_command)
Exemple #4
0
def initialize_parser(subparsers):
    parser = subparsers.add_parser('import',
                                   help='Import Box into a Workspace')

    add_standard_argument(parser, BOXES_PATH_ARG)
    add_standard_argument(parser, WORKSPACE_ID_ARG)
    add_standard_argument(parser, COMMENT_ARG)
    add_standard_argument(parser, IMAGE_ARG)
    parser.add_argument(dest='box_name', metavar='box-name', help='Box ID')
    parser.set_defaults(func=execute_command)
Exemple #5
0
def initialize_parser(subparsers):
    parser = subparsers.add_parser('get', help='Return specified object')

    ebcli.add_standard_argument(parser, ebcli.FIELDS_ARG)

    group = parser.add_mutually_exclusive_group(required=True)
    ebcli.add_standard_argument(group, ebcli.BOX_ID_ARG)
    ebcli.add_standard_argument(group, ebcli.INSTANCE_ID_ARG)
    ebcli.add_standard_argument(group, ebcli.WORKSPACE_ID_ARG)

    parser.set_defaults(func=execute_command)
Exemple #6
0
def initialize_parser(subparsers):
    parser = subparsers.add_parser('boxes', help='List boxes')

    ebcli.add_standard_argument(parser, ebcli.FIELDS_ARG, default=BOX_DEFAULT_FIELDS)
    ebcli.add_standard_argument(parser, ebcli.REQUIREMENTS_ARG)
    ebcli.add_standard_argument(parser, ebcli.WORKSPACE_ID_ARG)

    parser.set_defaults(func=execute_command)
Exemple #7
0
def initialize_parser(subparsers):
    parser = subparsers.add_parser('deploy',
                                   help='Deploy application from document')

    ebcli.add_standard_argument(parser, ebcli.WORKSPACE_ID_ARG)
    ebcli.add_standard_argument(parser, ebcli.TAGS_ARG)
    ebcli.add_standard_argument(parser, ebcli.CLAIMS_ARG)
    parser.add_argument(dest='input', help='Application document to publish')
    parser.set_defaults(func=execute_command)
Exemple #8
0
def initialize_parser(subparsers):
    parser = subparsers.add_parser('set', help='Update a variable of the given box or instance')

    ebcli.add_standard_argument(parser, ebcli.VARIABLE_ARG)

    group = parser.add_mutually_exclusive_group(required=True)
    ebcli.add_standard_argument(group, ebcli.BOX_ID_ARG)
    ebcli.add_standard_argument(group, ebcli.INSTANCE_ID_ARG)

    parser.set_defaults(func=execute_command)
Exemple #9
0
def initialize_parser(subparsers):
    parser = subparsers.add_parser('instances', help='List instances')

    ebcli.add_standard_argument(parser,
                                ebcli.FIELDS_ARG,
                                default=INSTANCE_DEFAULT_FIELDS)
    ebcli.add_standard_argument(parser, ebcli.TAGS_ARG)
    ebcli.add_standard_argument(parser, ebcli.WORKSPACE_ID_ARG)

    parser.set_defaults(func=execute_command)
Exemple #10
0
def initialize_parser(subparsers):
    parser = subparsers.add_parser('terminate',
                                   help='Terminate the given instance')

    ebcli.add_standard_argument(parser, ebcli.INSTANCE_ID_ARG, required=True)
    parser.set_defaults(func=execute_command)