def initCmdLineParser(): """ Initiate the optparse object, add all the groups and general command line flags and returns the optparse object """ # Init parser and all general flags usage = "usage: %prog [options] [--help]" parser = OptionParser(usage=usage, version="%prog {0}".format(version_info.version_string())) parser.add_option("--gen-answer-file", help="Generate a template of an answer file.") parser.add_option( "--answer-file", help="Runs the configuration in non-interactive mode, extracting all information from the" "configuration file. using this option excludes all other options", ) parser.add_option( "--install-hosts", help="Install on a set of hosts in a single step. The format should be a comma separated list " "of hosts, the first is setup as a controller, and the others are setup as compute nodes." "if only a single host is supplied then it is setup as an all in one installation. An answerfile " "will also be generated and should be used if Packstack needs to be run a second time ", ) parser.add_option( "--allinone", action="store_true", help="Shorthand for --install-hosts=<local ipaddr> --novanetwork-pubif=<dev> " "--novacompute-privif=lo --novanetwork-privif=lo --os-swift-install=y --nagios-install=y " ", this option can be used to install an all in one OpenStack on this host", ) parser.add_option("-t", "--timeout", default=300, help="The timeout for puppet Exec calls") parser.add_option( "-o", "--options", action="store_true", dest="options", help="Print details on options available in answer file(rst format)", ) parser.add_option("-d", "--debug", action="store_true", default=False, help="Enable debug in logging") parser.add_option( "-y", "--dry-run", action="store_true", default=False, help="Don't execute, just generate manifests" ) # For each group, create a group option for group in controller.getAllGroups(): groupParser = OptionGroup(parser, group.DESCRIPTION) for param in group.parameters.itervalues(): cmdOption = param.CMD_OPTION paramUsage = param.USAGE optionsList = param.OPTION_LIST useDefault = param.USE_DEFAULT if not useDefault: groupParser.add_option("--%s" % cmdOption, help=paramUsage) # Add group parser to main parser parser.add_option_group(groupParser) return parser
def initCmdLineParser(): """ Initiate the optparse object, add all the groups and general command line flags and returns the optparse object """ # Init parser and all general flags usage = "usage: %prog [options] [--help]" parser = OptionParser(usage=usage, version="%prog {0}".format(version_info.version_string())) parser.add_option("--gen-answer-file", help="Generate a template of an answer file.") parser.add_option("--answer-file", help="Runs the configuration in non-interactive mode, extracting all information from the" "configuration file. using this option excludes all other options") parser.add_option("--install-hosts", help="Install on a set of hosts in a single step. The format should be a comma separated list " "of hosts, the first is setup as a controller, and the others are setup as compute nodes." "if only a single host is supplied then it is setup as an all in one installation. An answerfile " "will also be generated and should be used if Packstack needs to be run a second time ") parser.add_option("--allinone", action="store_true", help="Shorthand for --install-hosts=<local ipaddr> --novanetwork-pubif=<dev> " "--novacompute-privif=lo --novanetwork-privif=lo --os-swift-install=y" ", this option can be used to install an all in one OpenStack on this host") parser.add_option("-t", "--timeout", default=300, help="The timeout for puppet Exec calls") parser.add_option("-o", "--options", action="store_true", dest="options", help="Print details on options available in answer file(rst format)") parser.add_option("-d", "--debug", action="store_true", default=False, help="Enable debug in logging") parser.add_option("-y", "--dry-run", action="store_true", default=False, help="Don't execute, just generate manifests") # For each group, create a group option for group in controller.getAllGroups(): groupParser = OptionGroup(parser, group.DESCRIPTION) for param in group.parameters.itervalues(): cmdOption = param.CMD_OPTION paramUsage = param.USAGE optionsList = param.OPTION_LIST useDefault = param.USE_DEFAULT if not useDefault: groupParser.add_option("--%s" % cmdOption, help=paramUsage) # Add group parser to main parser parser.add_option_group(groupParser) return parser
# The encoding of source files. # source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'packstack' # General information about the project. project = u'packstack' copyright = u'2012, Red Hat' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = version_info.version_string() # The full version, including alpha/beta/rc tags. release = version_info.release_string() # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: # today = '' # Else, today_fmt is used as the format for a strftime call. # today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files.