diff --git a/CHANGELOG b/CHANGELOG index 3fdd45fc..a5726009 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 diff --git a/docs/api/v2/compute/server/debug.rst b/docs/api/v2/compute/server/debug.rst index 1e04dd1a..c0125d34 100644 --- a/docs/api/v2/compute/server/debug.rst +++ b/docs/api/v2/compute/server/debug.rst @@ -5,7 +5,7 @@ GET /v2/compute/debug ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Return debug informations about the compute +Return debug information about the compute Response status codes ********************** diff --git a/gns3server/compute/port_manager.py b/gns3server/compute/port_manager.py index c78dbc9b..6be33845 100644 --- a/gns3server/compute/port_manager.py +++ b/gns3server/compute/port_manager.py @@ -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, diff --git a/gns3server/controller/node.py b/gns3server/controller/node.py index 38bf753d..d42b6e68 100644 --- a/gns3server/controller/node.py +++ b/gns3server/controller/node.py @@ -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] != "": diff --git a/gns3server/controller/project.py b/gns3server/controller/project.py index a8632a46..8c711e7d 100644 --- a/gns3server/controller/project.py +++ b/gns3server/controller/project.py @@ -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() diff --git a/gns3server/handlers/api/compute/server_handler.py b/gns3server/handlers/api/compute/server_handler.py index 33ab1792..ee7ccc1c 100644 --- a/gns3server/handlers/api/compute/server_handler.py +++ b/gns3server/handlers/api/compute/server_handler.py @@ -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" diff --git a/gns3server/handlers/api/controller/compute_handler.py b/gns3server/handlers/api/controller/compute_handler.py index 8695c900..7225d3dd 100644 --- a/gns3server/handlers/api/controller/compute_handler.py +++ b/gns3server/handlers/api/controller/compute_handler.py @@ -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", diff --git a/gns3server/handlers/api/controller/project_handler.py b/gns3server/handlers/api/controller/project_handler.py index 37137ca2..5460f434 100644 --- a/gns3server/handlers/api/controller/project_handler.py +++ b/gns3server/handlers/api/controller/project_handler.py @@ -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() diff --git a/gns3server/handlers/api/controller/server_handler.py b/gns3server/handlers/api/controller/server_handler.py index fcc7238a..311e66ea 100644 --- a/gns3server/handlers/api/controller/server_handler.py +++ b/gns3server/handlers/api/controller/server_handler.py @@ -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":