text
stringlengths 0
93.6k
|
---|
version=VERSION,
|
help="show program's version number and exit")
|
loggingGroupOpts = parser.add_argument_group(
|
'Logging Options', 'List of optional logging options')
|
loggingGroupOpts.add_argument(
|
"-q", "--quiet",
|
action="store_true",
|
default=False,
|
dest="isQuiet",
|
help="Disable logging in the console. Nothing will be printed.")
|
loggingGroupOpts.add_argument(
|
"-l", "--loglevel",
|
action="store",
|
default="INFO",
|
dest="loglevel",
|
metavar="LOG_LEVEL",
|
help=("LOG_LEVEL might be set to: CRITICAL, ERROR,"
|
" WARNING, INFO, DEBUG. (Default: INFO)"))
|
parser.add_argument(
|
"-f", "--topology-file",
|
action="store",
|
required=True,
|
dest="topo_file",
|
metavar="TOPOLOGY",
|
help="Topology file to load the data from.")
|
parser.add_argument(
|
"-d", "--detailed-topo",
|
action="store_true",
|
default=False,
|
dest="detailed_topo",
|
help=("If the user needs a detailed topology, use 'record' shapes and"
|
" draw individual ports on each shape. Note that a detailed"
|
" topology might be good for visualization, but it is not"
|
" supported by Gephi.\n"
|
"Default: False (use 'rectangle' shapes with multiple"
|
" connections)."))
|
parser.add_argument(
|
"-c", "--use-clusters",
|
action="store_true",
|
default=False,
|
dest="use_clusters",
|
help=("If enabled, HCAs (nodes) connected to the same switches are"
|
" grouped in the same cluster.\n"
|
"Unfortunately only 'dot' supports clustering at the moment,"
|
" so clustering is disabled by default.\n"
|
"Default: False"))
|
parser.add_argument(
|
"-o", "--optimized-for-black-bg",
|
action="store_true",
|
default=False,
|
dest="optimize_black_bg",
|
help=("Gephi can make really good looking graphs on black background."
|
" If you are about to plot a final graph on black background"
|
" then use this option to optimize the colors for it.\n"
|
"Default: False"))
|
parser.add_argument(
|
"-r", "--render-file",
|
action="store_true",
|
default=False,
|
dest="render_file",
|
help=("If enabled, the output will be rendered with the 'neato'"
|
" layout, and saved in a PDF file.\n"
|
"Default: False"))
|
parser.add_argument(
|
"-e", "--export-gexf",
|
action="store_true",
|
default=False,
|
dest="export_gexf",
|
help=("Support for DOT files in Gephi is really bad. Use this option"
|
" to export a gexf file if you want to play with the graph in"
|
" Gephi.\n"
|
"Default: False"))
|
opts = parser.parse_args()
|
if opts.isQuiet:
|
opts.loglevel = "NOTSET"
|
return opts
|
# #################################################
|
# ############## WRITE MAIN PROGRAM ###############
|
# #################################################
|
if __name__ == '__main__':
|
"""
|
Write the main program here
|
"""
|
# Parse the command line options
|
options = _command_Line_Options()
|
# Configure logging
|
_configureLogging(options.loglevel)
|
LOG.info("%s v%s is running...\n", PROGRAM_NAME, VERSION)
|
######################################
|
# LOG.critical("CRITICAL messages are printed")
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.