Exemple #1
0
    def create_parser():
        parser = OptParser(option_class=OptChecker,
            description="Greenplum Package Manager",
            version='%prog version $Revision: #1 $')
        parser.setHelp([])

        addStandardLoggingAndHelpOptions(parser, includeNonInteractiveOption=True)

        parser.remove_option('-q')
        parser.remove_option('-l')
        
        add_to = OptionGroup(parser, 'General Options')
        parser.add_option_group(add_to)

        addMasterDirectoryOptionForSingleClusterProgram(add_to)

        # TODO: AK: Eventually, these options may need to be flexible enough to accept mutiple packages
        # in one invocation. If so, the structure of this parser may need to change.
        add_to.add_option('-i', '--install', help='install the given gppkg', metavar='<package>')
        add_to.add_option('-u', '--update', help='update the given gppkg', metavar='<package>')
        add_to.add_option('-r', '--remove', help='remove the given gppkg', metavar='<name>-<version>')
        add_to.add_option('-q', '--query', help='query the gppkg database or a particular gppkg', action='store_true')
        add_to.add_option('-b', '--build', help='build a gppkg', metavar='<directory>')
        add_to.add_option('-c', '--clean', help='clean the cluster of the given gppkg', action='store_true')
        add_to.add_option('--migrate', help='migrate gppkgs from a separate $GPHOME', metavar='<from_gphome> <to_gphome>', action='store_true', default=False)

        add_to = OptionGroup(parser, 'Query Options')
        parser.add_option_group(add_to)
        add_to.add_option('--info', action='store_true', help='print information about the gppkg including name, version, description')
        add_to.add_option('--list', action='store_true', help='print all the files present in the gppkg')
        add_to.add_option('--all', action='store_true', help='print all the gppkgs installed by gppkg')

        return parser
Exemple #2
0
    def create_parser():
        parser = OptParser(option_class=OptChecker,
            description="Greenplum Package Manager",
            version='%prog version $Revision: #1 $')
        parser.setHelp([])

        addStandardLoggingAndHelpOptions(parser, includeNonInteractiveOption=True)

        parser.remove_option('-q')
        parser.remove_option('-l')

        add_to = OptionGroup(parser, 'General Options')
        parser.add_option_group(add_to)

        addMasterDirectoryOptionForSingleClusterProgram(add_to)

        # TODO: AK: Eventually, these options may need to be flexible enough to accept mutiple packages
        # in one invocation. If so, the structure of this parser may need to change.
        add_to.add_option('-i', '--install', help='install the given gppkg', metavar='<package>')
        add_to.add_option('-u', '--update', help='update the given gppkg', metavar='<package>')
        add_to.add_option('-r', '--remove', help='remove the given gppkg', metavar='<name>-<version>')
        add_to.add_option('-q', '--query', help='query the gppkg database or a particular gppkg', action='store_true')
        add_to.add_option('-b', '--build', help='build a gppkg', metavar='<directory>')
        add_to.add_option('-c', '--clean', help='clean the cluster of the given gppkg', action='store_true')
        add_to.add_option('--migrate', help='migrate gppkgs from a separate $GPHOME', metavar='<from_gphome> <to_gphome>', action='store_true', default=False)
        add_to.add_option('-f', '--filename', help='set specific package name', metavar='<name>')

        add_to = OptionGroup(parser, 'Query Options')
        parser.add_option_group(add_to)
        add_to.add_option('--info', action='store_true', help='print information about the gppkg including name, version, description')
        add_to.add_option('--list', action='store_true', help='print all the files present in the gppkg')
        add_to.add_option('--all', action='store_true', help='print all the gppkgs installed by gppkg')

        return parser
Exemple #3
0
    def create_parser():
        parser = OptParser(
            option_class=OptChecker, description="Greenplum Package Manager", version="%prog version $Revision: #1 $"
        )
        parser.setHelp([])

        addStandardLoggingAndHelpOptions(parser, includeNonInteractiveOption=True)

        parser.remove_option("-q")
        parser.remove_option("-l")

        add_to = OptionGroup(parser, "General Options")
        parser.add_option_group(add_to)

        addMasterDirectoryOptionForSingleClusterProgram(add_to)

        # TODO: AK: Eventually, these options may need to be flexible enough to accept mutiple packages
        # in one invocation. If so, the structure of this parser may need to change.
        add_to.add_option("-i", "--install", help="install the given gppkg", metavar="<package>")
        add_to.add_option("-u", "--update", help="update the given gppkg", metavar="<package>")
        add_to.add_option("-r", "--remove", help="remove the given gppkg", metavar="<name>-<version>")
        add_to.add_option("-q", "--query", help="query the gppkg database or a particular gppkg", action="store_true")
        add_to.add_option("-b", "--build", help="build a gppkg", metavar="<directory>")
        add_to.add_option("-c", "--clean", help="clean the cluster of the given gppkg", action="store_true")
        add_to.add_option(
            "--migrate",
            help="migrate gppkgs from a separate $GPHOME",
            metavar="<from_gphome> <to_gphome>",
            action="store_true",
            default=False,
        )

        add_to = OptionGroup(parser, "Query Options")
        parser.add_option_group(add_to)
        add_to.add_option(
            "--info", action="store_true", help="print information about the gppkg including name, version, description"
        )
        add_to.add_option("--list", action="store_true", help="print all the files present in the gppkg")
        add_to.add_option("--all", action="store_true", help="print all the gppkgs installed by gppkg")

        return parser
def create_parser():
    parser = OptParser(option_class=OptChecker, 
                       version='%prog version $Revision: #1 $',
                       description='Persistent tables backp and restore')

    addStandardLoggingAndHelpOptions(parser, includeNonInteractiveOption=True)

    addTo = OptionGroup(parser, 'Connection opts')
    parser.add_option_group(addTo)
    addMasterDirectoryOptionForSingleClusterProgram(addTo)

    addTo = OptionGroup(parser, 'Persistent tables backup and restore options')
    addTo.add_option('--backup', metavar="<pickled dbid info>", type="string",
                     help="A list of dbid info where backups need to be done in pickled format")
    addTo.add_option('--restore', metavar="<pickled dbid info>", type="string",
                     help="A list of dbid info where restore needs to be done in pickled format")
    addTo.add_option('--validate-backups', metavar="<pickled dbid info>", type="string",
                     help="A list of dbid info where validation needs to be done in pickled format")
    addTo.add_option('--validate-backup-dir', metavar="<pickled dbid info>", type="string",
                     help="A list of dbid info where validation needs to be done in pickled format")
    addTo.add_option('--timestamp', metavar="<timestamp of backup>", type="string",
                     help="A timestamp for the backup that needs to be validated") 
    addTo.add_option('--batch-size', metavar="<batch size for the worker pool>", type="int",
                      help="Batch size for parallelism in worker pool")
    addTo.add_option('--backup-dir', metavar="<backup directory>", type="string",
                      help="Backup directory for persistent tables and transaction logs")
    addTo.add_option('--perdbpt', metavar="<per database pt filename>", type="string",  
                      help="Filenames for per database persistent files")
    addTo.add_option('--globalpt', metavar="<global pt filenames>", type="string",
                      help="Filenames for global persistent files")
    addTo.add_option('--validate-source-file-only', action='store_true', default=False,
                      help="validate that required source files existed for backup and restore")

    parser.setHelp([
    """
    This tool is used to backup persistent table files.
    """
    ])

    return parser
Exemple #5
0
def create_parser():
    parser = OptParser(option_class=OptChecker,
                       version='%prog version $Revision: #1 $',
                       description='Persistent tables backp and restore')

    addStandardLoggingAndHelpOptions(parser, includeNonInteractiveOption=True)

    addTo = OptionGroup(parser, 'Connection opts')
    parser.add_option_group(addTo)
    addMasterDirectoryOptionForSingleClusterProgram(addTo)

    addTo = OptionGroup(parser, 'Persistent tables backup and restore options')
    addTo.add_option(
        '--backup',
        metavar="<pickled dbid info>",
        type="string",
        help=
        "A list of dbid info where backups need to be done in pickled format")
    addTo.add_option(
        '--restore',
        metavar="<pickled dbid info>",
        type="string",
        help=
        "A list of dbid info where restore needs to be done in pickled format")
    addTo.add_option(
        '--validate-backups',
        metavar="<pickled dbid info>",
        type="string",
        help=
        "A list of dbid info where validation needs to be done in pickled format"
    )
    addTo.add_option(
        '--validate-backup-dir',
        metavar="<pickled dbid info>",
        type="string",
        help=
        "A list of dbid info where validation needs to be done in pickled format"
    )
    addTo.add_option(
        '--timestamp',
        metavar="<timestamp of backup>",
        type="string",
        help="A timestamp for the backup that needs to be validated")
    addTo.add_option('--batch-size',
                     metavar="<batch size for the worker pool>",
                     type="int",
                     help="Batch size for parallelism in worker pool")
    addTo.add_option(
        '--backup-dir',
        metavar="<backup directory>",
        type="string",
        help="Backup directory for persistent tables and transaction logs")
    addTo.add_option('--perdbpt',
                     metavar="<per database pt filename>",
                     type="string",
                     help="Filenames for per database persistent files")
    addTo.add_option('--globalpt',
                     metavar="<global pt filenames>",
                     type="string",
                     help="Filenames for global persistent files")
    addTo.add_option(
        '--validate-source-file-only',
        action='store_true',
        default=False,
        help=
        "validate that required source files existed for backup and restore")

    parser.setHelp(
        ["""
    This tool is used to backup persistent table files.
    """])

    return parser