- opts, args = getopt.getopt(sys.argv[1:], "hvc:V:p:P:", ["config", "help", "version", "port", "vnf-repository", "adminport"])
- except getopt.GetoptError as err:
- # print help information and exit:
- print "Error:", err # will print something like "option -a not recognized"
- usage()
- sys.exit(2)
-
- port=None
- port_admin = None
- config_file = 'openmanod.cfg'
- vnf_repository = None
-
- for o, a in opts:
- if o in ("-v", "--version"):
- print "openmanod version", __version__, version_date
- print "(c) Copyright Telefonica"
- sys.exit()
- elif o in ("-h", "--help"):
- usage()
- sys.exit()
- elif o in ("-V", "--vnf-repository"):
- vnf_repository = a
- elif o in ("-c", "--config"):
- config_file = a
- elif o in ("-p", "--port"):
- port = a
- elif o in ("-P", "--adminport"):
- port_admin = a
- else:
- assert False, "Unhandled option"
-
- try:
- r, global_config = load_configuration(config_file)
+ #load parameters and configuration
+ opts, args = getopt.getopt(sys.argv[1:], "hvc:V:p:P:", ["config", "help", "version", "port", "vnf-repository", "adminport", "log-socket-host"])
+ port=None
+ port_admin = None
+ config_file = 'openmanod.cfg'
+ vnf_repository = None
+ log_socket_host = None
+ log_socket_port = None
+
+ for o, a in opts:
+ if o in ("-v", "--version"):
+ print ("openmanod version " + __version__ + ' ' + version_date)
+ print ("(c) Copyright Telefonica")
+ sys.exit()
+ elif o in ("-h", "--help"):
+ usage()
+ sys.exit()
+ elif o in ("-V", "--vnf-repository"):
+ vnf_repository = a
+ elif o in ("-c", "--config"):
+ config_file = a
+ elif o in ("-p", "--port"):
+ port = a
+ elif o in ("-P", "--adminport"):
+ port_admin = a
+ elif o == "--log-socket-port":
+ log_socket_port = a
+ elif o == "--log-socket-port":
+ log_socket_host = a
+ else:
+ assert False, "Unhandled option"
+ global_config = load_configuration(config_file)