mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Support for --version on the command line.
This commit is contained in:
1 parent
2a888f93ce
commit
4ae7875010
2 files changed
+36
-7
No files matched your search
@@ -263,6 +263,30 @@ class IOU(IModule):
|
||||
|
||||
log.debug("received request {}".format(request))
|
||||
|
||||
def test_result(self, message, result="error"):
|
||||
"""
|
||||
"""
|
||||
|
||||
return {"result": result, "message": message}
|
||||
|
||||
@IModule.route("iou.test_settings")
|
||||
def test_settings(self, request):
|
||||
"""
|
||||
"""
|
||||
|
||||
response = []
|
||||
|
||||
# test iourc
|
||||
if self._iourc == "":
|
||||
response.append(self.test_result("No iourc file has been added"))
|
||||
elif not os.path.isfile(self._iourc):
|
||||
response.append(self.test_result("iourc file {} is not accessible".format(self._iourc)))
|
||||
else:
|
||||
#TODO: check hostname + license inside the file
|
||||
pass
|
||||
|
||||
self.send_response(response)
|
||||
|
||||
@IModule.route("iou.create")
|
||||
def iou_create(self, request):
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user