示例#1
0
 def get_optparser(self):
     parser = cmdln.CmdlnOptionParser(self)
     parser.add_option("--dry", action="store_true", help="dry run")
     parser.add_option("--debug", action="store_true", help="debug output")
     parser.add_option(
         "--release",
         action="store_true",
         help="trigger release in build service (default for openSUSE)")
     parser.add_option(
         "--norelease",
         action="store_true",
         help="do not trigger release in build service (default for SLE)")
     parser.add_option("--verbose", action="store_true", help="verbose")
     parser.add_option("--osc-debug",
                       action="store_true",
                       help="osc debug output")
     parser.add_option(
         "--openqa-server",
         help=
         """Full URL to the openQA server that should be queried, default based on project selection, e.g.
         'https://openqa.opensuse.org' for 'openSUSE'""")
     parser.add_option(
         "--obs-api-url",
         help=
         """Full URL to OBS instance to be queried, default based on project selection, e.g.
         'https://api.opensuse.org' for 'openSUSE'""")
     return parser
示例#2
0
 def get_optparser(self):
     parser = cmdln.CmdlnOptionParser(self)
     parser.add_option("--dry", action="store_true", help="dry run")
     parser.add_option("--debug", action="store_true", help="debug output")
     parser.add_option("--verbose", action="store_true", help="verbose")
     parser.add_option("--osc-debug",
                       action="store_true",
                       help="osc debug output")
     parser.add_option(
         "--project-base",
         help=
         """Select base of OBS/IBS project as well as openQA server based on distribution family, e.g. 'openSUSE' or 'SLE', default:
         'openSUSE'""")
     parser.add_option(
         "--openqa-server",
         help=
         """Full URL to the openQA server that should be queried, default based on '--project-base' selection, e.g.
         'https://openqa.opensuse.org' for 'openSUSE'""")
     parser.add_option(
         "--obs-api-url",
         help=
         """Full URL to OBS instance to be queried, default based on '--project-base' selection, e.g.
         'https://api.opensuse.org' for 'openSUSE'""")
     return parser
     return parser
示例#3
0
 def get_optparser(self):
     parser = cmdln.CmdlnOptionParser(self)
     parser.add_option("--dry", action="store_true", help="dry run")
     parser.add_option("--debug", action="store_true", help="debug output")
     parser.add_option("--verbose", action="store_true", help="verbose")
     parser.add_option("--osc-debug", action="store_true", help="osc debug output")
     return parser
示例#4
0
 def get_optparser(self):
     parser = cmdln.CmdlnOptionParser(self)
     parser.add_option("--dry", action="store_true", help="dry run")
     parser.add_option("--debug", action="store_true", help="debug output")
     parser.add_option("--verbose", action="store_true", help="verbose")
     parser.add_option("--system", action="store_true", help="with system repo")
     parser.add_option("--arch", dest="arch", help="architecture", default='x86_64')
     return parser
示例#5
0
    def get_optparser(self):
        """Parser for global options (that are not specific to a subcommand).
        """
        optparser = cmdln.CmdlnOptionParser(self)

        optparser.add_option('-c',
                             '--config',
                             action='store',
                             dest="config_filename",
                             default="conf.ini",
                             help='The global config file %default')

        return optparser
示例#6
0
def _do_main(argv):
    shell = Shell()
    optparser = cmdln.CmdlnOptionParser(shell, version="ci2 " + __version__)
    optparser.add_option(
        "-v",
        "--verbose",
        action="callback",
        callback=_set_verbosity,
        help="More verbose output. Repeat for more and more output.")
    optparser.add_option(
        "-L",
        "--log-level",
        action="callback",
        callback=_set_logger_level,
        nargs=1,
        type="str",
        help="Specify a logger level via '<logname>:<levelname>'.")
    return shell.main(sys.argv, optparser=optparser)