Beispiel #1
0
def run_command_check(options):
    from crossbar.node.config import check_config_file

    configfile = os.path.join(options.cbdir, "config.json")
    print ("Checking local configuration file {} ...".format(configfile))
    try:
        check_config_file(configfile)
    except Exception as e:
        print ("Error encountered:")
        print
        print (e)
        print
    else:
        print ("Ok, configuration file looks good.")
Beispiel #2
0
   def start_from_local_config(self, configfile):
      ## load Crossbar.io node configuration
      ##
      configfile = os.path.abspath(configfile)

      log.msg("Loading from local config '{}' ..".format(configfile))

      config = check_config_file(configfile, silence = True)

      ## startup the node from configuration file
      ##
      yield self._node_controller_session.run_node_config(config)

      log.msg("Local configuration loaded.")