+ # Override parameters obtained by command line
+ if port:
+ global_config['http_port'] = port
+ if port_admin:
+ global_config['http_admin_port'] = port_admin
+ if log_socket_host:
+ global_config['log_socket_host'] = log_socket_host
+ if log_socket_port:
+ global_config['log_socket_port'] = log_socket_port
+ if log_file:
+ global_config['log_file'] = log_file
+# if vnf_repository is not None:
+# global_config['vnf_repository'] = vnf_repository
+# else:
+# if not 'vnf_repository' in global_config:
+# logger.error( os.getcwd() )
+# global_config['vnf_repository'] = os.getcwd()+'/vnfrepo'
+# #print global_config
+# if not os.path.exists(global_config['vnf_repository']):
+# logger.error( "Creating folder vnf_repository folder: '%s'.", global_config['vnf_repository'])
+# try:
+# os.makedirs(global_config['vnf_repository'])
+# except Exception as e:
+# logger.error( "Error '%s'. Ensure the path 'vnf_repository' is properly set at %s",e.args[1], config_file)
+# exit(-1)
+
+ global_config["console_port_iterator"] = console_port_iterator
+ global_config["console_thread"]={}
+ global_config["console_ports"]={}
+ if not global_config["http_console_host"]:
+ global_config["http_console_host"] = global_config["http_host"]
+ if global_config["http_host"]=="0.0.0.0":
+ global_config["http_console_host"] = socket.gethostname()
+
+ #Configure logging STEP 2