Network handler for UDP port allocation and server network interfaces.

This commit is contained in:
Jeremy
2015-01-24 15:32:58 -07:00
parent c002bbfb23
commit 50fea669b5
9 changed files with 134 additions and 63 deletions

View File

@ -50,22 +50,6 @@ class Server:
self._start_time = time.time()
self._port_manager = PortManager(host)
# TODO: server config file support, to be reviewed
# # get the projects and temp directories from the configuration file (passed to the modules)
# config = Config.instance()
# server_config = config.get_default_section()
# # default projects directory is "~/GNS3/projects"
# self._projects_dir = os.path.expandvars(os.path.expanduser(server_config.get("projects_directory", "~/GNS3/projects")))
# self._temp_dir = server_config.get("temporary_directory", tempfile.gettempdir())
#
# try:
# os.makedirs(self._projects_dir)
# log.info("projects directory '{}' created".format(self._projects_dir))
# except FileExistsError:
# pass
# except OSError as e:
# log.error("could not create the projects directory {}: {}".format(self._projects_dir, e))
@asyncio.coroutine
def _run_application(self, app, ssl_context=None):