mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-24 09:18:08 +00:00
Fix some typos.
This commit is contained in:
parent
181a31be32
commit
e4a6db8ebc
@ -681,7 +681,7 @@
|
||||
* Fix naming of IOU serial interfaces
|
||||
* Improve timeout management
|
||||
* When exporting debug information export GNS3 VM vmx content
|
||||
* /debug for exporting debug informations
|
||||
* /debug for exporting debug information
|
||||
* Raise error if using a non linked clone VM twice
|
||||
* Fix a possible deadlock at exit
|
||||
* Fix import of some old dynamips topologies
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
GET /v2/compute/debug
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Return debug informations about the compute
|
||||
Return debug information about the compute
|
||||
|
||||
Response status codes
|
||||
**********************
|
||||
|
@ -23,7 +23,7 @@ import logging
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
# This ports are disallowed by Chrome and Firefox to avoid issues, we skip them as well
|
||||
# These ports are disallowed by Chrome and Firefox to avoid issues, we skip them as well
|
||||
BANNED_PORTS = set((1, 7, 9, 11, 13, 15, 17, 19, 20, 21, 22, 23, 25, 37, 42, 43, 53, 77, 79, 87, 95, 101, 102, 103,
|
||||
104, 109, 110, 111, 113, 115, 117, 119, 123, 135, 139, 143, 179, 389, 465, 512, 513, 514, 515, 526,
|
||||
530, 531, 532, 540, 556, 563, 587, 601, 636, 993, 995, 2049, 3659, 4045, 6000, 6665, 6666, 6667,
|
||||
|
@ -91,12 +91,12 @@ class Node:
|
||||
|
||||
# Update node properties with additional elements
|
||||
for prop in kwargs:
|
||||
if prop not in ignore_properties:
|
||||
if prop and prop not in ignore_properties:
|
||||
if hasattr(self, prop):
|
||||
try:
|
||||
setattr(self, prop, kwargs[prop])
|
||||
except AttributeError as e:
|
||||
log.critical("Can't set attribute %s", prop)
|
||||
log.critical("Cannot set attribute '%s'".format(prop))
|
||||
raise e
|
||||
else:
|
||||
if prop not in self.CONTROLLER_ONLY_PROPERTIES and kwargs[prop] is not None and kwargs[prop] != "":
|
||||
|
@ -935,7 +935,7 @@ class Project:
|
||||
with open(project_path, "rb") as f:
|
||||
project = yield from import_project(self._controller, str(uuid.uuid4()), f, location=location, name=name, keep_compute_id=True)
|
||||
except (ValueError, OSError, UnicodeEncodeError) as e:
|
||||
raise aiohttp.web.HTTPConflict(text="Can not duplicate project: {}".format(str(e)))
|
||||
raise aiohttp.web.HTTPConflict(text="Cannot duplicate project: {}".format(str(e)))
|
||||
|
||||
if previous_status == "closed":
|
||||
yield from self.close()
|
||||
|
@ -42,9 +42,9 @@ class ServerHandler:
|
||||
|
||||
@Route.get(
|
||||
r"/debug",
|
||||
description="Return debug informations about the compute",
|
||||
description="Return debug information about the compute",
|
||||
status_codes={
|
||||
201: "Writed"
|
||||
201: "Written"
|
||||
})
|
||||
def debug(request, response):
|
||||
response.content_type = "text/plain"
|
||||
|
@ -59,7 +59,7 @@ class ComputeHandler:
|
||||
|
||||
@Route.put(
|
||||
r"/computes/{compute_id}",
|
||||
description="Get a compute server information",
|
||||
description="Update a compute server",
|
||||
status_codes={
|
||||
200: "Compute server updated",
|
||||
400: "Invalid request",
|
||||
|
@ -287,9 +287,9 @@ class ProjectHandler:
|
||||
|
||||
try:
|
||||
with tempfile.TemporaryDirectory() as tmp_dir:
|
||||
datas = yield from export_project(
|
||||
project, tmp_dir,
|
||||
include_images=bool(int(request.query.get("include_images", "0"))))
|
||||
stream = yield from export_project(project,
|
||||
tmp_dir,
|
||||
include_images=bool(int(request.query.get("include_images", "0"))))
|
||||
# We need to do that now because export could failed and raise an HTTP error
|
||||
# that why response start need to be the later possible
|
||||
response.content_type = 'application/gns3project'
|
||||
@ -297,7 +297,7 @@ class ProjectHandler:
|
||||
response.enable_chunked_encoding()
|
||||
yield from response.prepare(request)
|
||||
|
||||
for data in datas:
|
||||
for data in stream:
|
||||
response.write(data)
|
||||
yield from response.drain()
|
||||
|
||||
|
@ -139,7 +139,7 @@ class ServerHandler:
|
||||
r"/debug",
|
||||
description="Dump debug information to disk (debug directory in config directory). Work only for local server",
|
||||
status_codes={
|
||||
201: "Writed"
|
||||
201: "Written"
|
||||
})
|
||||
def debug(request, response):
|
||||
|
||||
@ -156,7 +156,7 @@ class ServerHandler:
|
||||
f.write(ServerHandler._getDebugData())
|
||||
except Exception as e:
|
||||
# If something is wrong we log the info to the log and we hope the log will be include correctly to the debug export
|
||||
log.error("Could not export debug informations {}".format(e), exc_info=1)
|
||||
log.error("Could not export debug information {}".format(e), exc_info=1)
|
||||
|
||||
try:
|
||||
if Controller.instance().gns3vm.engine == "vmware":
|
||||
|
Loading…
Reference in New Issue
Block a user