def main(argv):
    flags, argv = network_config.ParseGenerationFlags(argv)

    config = network_config.NetworkConfig(flags.network_file)
    script_name = os.path.basename(argv[0])
    _WriteMessageStats(flags.autogen_root, flags.output_dir, script_name,
                       config.aio_messages)
Exemple #2
0
def main(argv):
    flags, argv = network_config.ParseGenerationFlags(argv)

    config = network_config.NetworkConfig(flags.network_file)
    script_name = os.path.basename(argv[0])
    _WriteSwitchDef(flags.autogen_root, flags.output_dir, script_name,
                    config.GetSwitchChips())
Exemple #3
0
def main(argv):
    flags, argv = network_config.ParseGenerationFlags(argv)

    config = network_config.NetworkConfig(flags.network_file)
    script_name = os.path.basename(argv[0])
    locations = node_locations.GetNodeLocations(config)
    _WriteAioNode(flags.autogen_root, flags.output_dir, script_name, config,
                  locations)
Exemple #4
0
def main(argv):
    flags, argv = network_config.ParseGenerationFlags(argv)

    config = network_config.NetworkConfig(flags.network_file)

    script_name = os.path.basename(argv[0])
    _WriteForwardingMapHeader(flags.autogen_root, flags.output_dir,
                              script_name, config.GetSwitches())
    _WriteForwardingMapSource(flags.autogen_root, flags.output_dir,
                              script_name, config)
def main(argv):
    flags, argv = network_config.ParseGenerationFlags(argv)

    config = network_config.NetworkConfig(flags.network_file)
    script_name = os.path.basename(argv[0])
    _WriteMessageType(flags.autogen_root, script_name, config.aio_messages,
                      flags.output_dir, 'message_type')
    _WriteMessageType(flags.autogen_root, script_name, config.eop_messages,
                      flags.output_dir, 'eop_message_type')
    _WriteMessageType(flags.autogen_root, script_name, config.winch_messages,
                      flags.output_dir, 'winch_message_type')
def main(argv):
    flags, argv = network_config.ParseGenerationFlags(argv)
    config = network_config.NetworkConfig(flags.network_file)
    source_file = os.path.join(flags.output_dir, 'switch_links.c')
    header_file = os.path.join(flags.output_dir, 'switch_links.h')
    rel_header_file = os.path.relpath(header_file, flags.autogen_root)

    with open(source_file, 'w') as f:
        f.write(_GenerateSource(rel_header_file, config))
    with open(header_file, 'w') as f:
        f.write(_GenerateHeader(rel_header_file))
def main(argv):
    flags, argv = network_config.ParseGenerationFlags(argv)

    config = network_config.NetworkConfig(flags.network_file)
    script_name = os.path.basename(argv[0])
    _WriteIpAddresses(flags.output_dir, script_name, config.aio_nodes)