1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-24 17:28:08 +00:00

Support for IOURC file on the server side.

This commit is contained in:
Jeremy 2015-01-04 15:59:00 -07:00
parent d1e186317c
commit 5265818365
2 changed files with 7 additions and 2 deletions

View File

@ -99,6 +99,7 @@ class IOU(IModule):
self._projects_dir = kwargs["projects_dir"]
self._tempdir = kwargs["temp_dir"]
self._working_dir = self._projects_dir
self._server_iourc_path = iou_config.get("iourc", "")
self._iourc = ""
# check every 5 seconds
@ -473,7 +474,11 @@ class IOU(IModule):
try:
iou_instance.iouyap = self._iouyap
iou_instance.iourc = self._iourc
if self._iourc:
iou_instance.iourc = self._iourc
else:
# if there is no IOURC file pushed by the client then use the server IOURC file
iou_instance.iourc = self._server_iourc_path
iou_instance.start()
except IOUError as e:
self.send_custom_error(str(e))

View File

@ -562,7 +562,7 @@ class IOUDevice(object):
self._library_check()
if not self._iourc or not os.path.isfile(self._iourc):
raise IOUError("A iourc file is necessary to start IOU")
raise IOUError("A valid iourc file is necessary to start IOU")
if not self._iouyap or not os.path.isfile(self._iouyap):
raise IOUError("iouyap is necessary to start IOU")