diff --git a/CHANGELOG b/CHANGELOG index a5726009..4a422b9a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -22,7 +22,7 @@ * Add missing coroutine decorator Ref https://github.com/GNS3/gns3-gui/issues/2566 * Refactor asyncio locking system for Python 3.7 support. Ref https://github.com/GNS3/gns3-gui/issues/2566 Ref https://github.com/GNS3/gns3-gui/issues/2568 * Use asyncio.ensure_future() instead of asyncio.async() with conservative approach to support Python < 3.4.4. Fixes https://github.com/GNS3/gns3-gui/issues/2566 -* Forbid controller and compute servers to be different versions. Report last compute server error to clients and display in the server summary. +* Forbid controller and computes to be different versions. Report last compute error to clients and display in the server summary. * Fix exception with short names for Dynamips interfaces. Fixes #1386. * Add missing Qemu boot priority values. Fixes https://github.com/GNS3/gns3-server/issues/1385 @@ -553,7 +553,7 @@ * Trust user for host binding of link adress * Code cleanup for docker interface creation * Fix a rare crash when writing a file on a remote server -* Fix delete project on remote compute server +* Fix delete project on remote compute * Fix trouble with builtin devices when we free ports * When a dynamips command failed display the full command to the user * Raise error when we can't found VboxManage at GNS3 VM startup diff --git a/docs/api/v2/controller/compute/s.rst b/docs/api/v2/controller/compute/s.rst index b9f6dd13..b6f637bc 100644 --- a/docs/api/v2/controller/compute/s.rst +++ b/docs/api/v2/controller/compute/s.rst @@ -5,11 +5,11 @@ POST /v2/computes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Register a compute server +Register a compute Response status codes ********************** -- **201**: Compute server added +- **201**: Compute added Input ******* @@ -34,7 +34,7 @@ Output Name Mandatory Type Description capabilities object Get what a server support compute_id ✔ string Server identifier - connected boolean Whether the controller is connected to the compute server or not + connected boolean Whether the controller is connected to the compute or not cpu_usage_percent ['number', 'null'] CPU usage of the compute. Read only host ✔ string Server host last_error ['string', 'null'] Last error on the compute @@ -48,9 +48,9 @@ Output GET /v2/computes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -List of compute servers +List of computes Response status codes ********************** -- **200**: Compute servers list returned +- **200**: Compute list returned diff --git a/docs/api/v2/controller/compute/sid.rst b/docs/api/v2/controller/compute/sid.rst index 7db81be5..c67515e2 100644 --- a/docs/api/v2/controller/compute/sid.rst +++ b/docs/api/v2/controller/compute/sid.rst @@ -5,11 +5,11 @@ PUT /v2/computes/**{compute_id}** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Update a compute server +Update a compute Response status codes ********************** -- **200**: Compute server updated +- **200**: Compute - **400**: Invalid request - **404**: Instance doesn't exist @@ -36,7 +36,7 @@ Output Name Mandatory Type Description capabilities object Get what a server support compute_id ✔ string Server identifier - connected boolean Whether the controller is connected to the compute server or not + connected boolean Whether the controller is connected to the compute or not cpu_usage_percent ['number', 'null'] CPU usage of the compute. Read only host ✔ string Server host last_error ['string', 'null'] Last error on the compute @@ -50,11 +50,11 @@ Output GET /v2/computes/**{compute_id}** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Get a compute server information +Get a compute information Response status codes ********************** -- **200**: Compute server information returned +- **200**: Compute information returned Output ******* @@ -64,7 +64,7 @@ Output Name Mandatory Type Description capabilities object Get what a server support compute_id ✔ string Server identifier - connected boolean Whether the controller is connected to the compute server or not + connected boolean Whether the controller is connected to the compute or not cpu_usage_percent ['number', 'null'] CPU usage of the compute. Read only host ✔ string Server host last_error ['string', 'null'] Last error on the compute diff --git a/docs/curl.rst b/docs/curl.rst index e714f0d4..2f5207a9 100644 --- a/docs/curl.rst +++ b/docs/curl.rst @@ -28,7 +28,7 @@ Check the server version with a simple curl command: List computes ############## -List all the compute servers: +List all the computes: .. code-block:: shell-session @@ -45,7 +45,7 @@ List all the compute servers: } ] -There is only one compute server where nodes can be run in this example. +There is only one compute where nodes can be run in this example. This compute as a special id: local, this is the local server which is embedded in the GNS3 controller. Create a project diff --git a/docs/endpoints.rst b/docs/endpoints.rst index a5e110ed..f2e56379 100644 --- a/docs/endpoints.rst +++ b/docs/endpoints.rst @@ -11,7 +11,7 @@ Controller endpoints The controller manages everything, it is the central decision point and has a complete view of your network topologies, what nodes run on -which compute server, the links between them etc. +which compute, the links between them etc. This is the high level API which can be used by users to manually control the GNS3 backend. The controller will call the compute endpoints when needed. diff --git a/docs/gns3_file.json b/docs/gns3_file.json index 573256ae..e5a34aef 100644 --- a/docs/gns3_file.json +++ b/docs/gns3_file.json @@ -154,7 +154,7 @@ ] }, "connected": { - "description": "Whether the controller is connected to the compute server or not", + "description": "Whether the controller is connected to the compute or not", "type": "boolean" }, "cpu_usage_percent": { diff --git a/gns3server/compute/notification_manager.py b/gns3server/compute/notification_manager.py index 490b63d7..b6b67f7e 100644 --- a/gns3server/compute/notification_manager.py +++ b/gns3server/compute/notification_manager.py @@ -23,7 +23,7 @@ from ..notification_queue import NotificationQueue class NotificationManager: """ Manage the notification queue where the controller - will connect to get notifications from compute servers + will connect to get notifications from computes """ def __init__(self): diff --git a/gns3server/controller/__init__.py b/gns3server/controller/__init__.py index 8a743a8d..9805ba1b 100644 --- a/gns3server/controller/__init__.py +++ b/gns3server/controller/__init__.py @@ -46,7 +46,7 @@ log = logging.getLogger(__name__) class Controller: """ - The controller is responsible to manage one or more compute servers. + The controller is responsible to manage one or more computes. """ def __init__(self): @@ -542,9 +542,9 @@ class Controller: async def add_compute(self, compute_id=None, name=None, force=False, connect=True, **kwargs): """ - Add a server to the dictionary of compute servers controlled by this controller + Add a server to the dictionary of computes controlled by this controller - :param compute_id: Compute server identifier + :param compute_id: Compute identifier :param name: Compute name :param force: True skip security check :param connect: True connect to the compute immediately @@ -604,7 +604,7 @@ class Controller: """ Delete a compute node. Project using this compute will be close - :param compute_id: Compute server identifier + :param compute_id: Compute identifier """ try: @@ -628,14 +628,14 @@ class Controller: @property def computes(self): """ - :returns: The dictionary of compute server managed by this controller + :returns: The dictionary of computes managed by this controller """ return self._computes def get_compute(self, compute_id): """ - Returns a compute server or raise a 404 error. + Returns a compute or raise a 404 error. """ try: diff --git a/gns3server/controller/compute.py b/gns3server/controller/compute.py index f6216fc4..8a4be5da 100644 --- a/gns3server/controller/compute.py +++ b/gns3server/controller/compute.py @@ -410,9 +410,9 @@ class Compute: msg = "GNS3 version {} is not the same as the GNS3 VM version {}. Please upgrade the GNS3 VM.".format(__version__, response.json["version"]) else: - msg = "GNS3 controller version {} is not the same as compute server {} version {}".format(__version__, - self._name, - response.json["version"]) + msg = "GNS3 controller version {} is not the same as compute {} version {}".format(__version__, + self._name, + response.json["version"]) if __version_info__[3] == 0: # Stable release log.error(msg) diff --git a/gns3server/controller/export_project.py b/gns3server/controller/export_project.py index 00baf332..17919286 100644 --- a/gns3server/controller/export_project.py +++ b/gns3server/controller/export_project.py @@ -95,7 +95,7 @@ async def export_project(project, temporary_dir, include_images=False, keep_comp try: data = await response.content.read(1024) except asyncio.TimeoutError: - raise aiohttp.web.HTTPRequestTimeout(text="Timeout when downloading file '{}' from remote compute server {}:{}".format(compute_file["path"], compute.host, compute.port)) + raise aiohttp.web.HTTPRequestTimeout(text="Timeout when downloading file '{}' from remote compute {}:{}".format(compute_file["path"], compute.host, compute.port)) if not data: break f.write(data) @@ -256,7 +256,7 @@ async def _export_remote_images(project, compute_id, image_type, image, project_ Export specific image from remote compute. """ - log.info("Downloading image '{}' from compute server '{}'".format(image, compute_id)) + log.info("Downloading image '{}' from compute '{}'".format(image, compute_id)) try: compute = [compute for compute in project.computes if compute.id == compute_id][0] @@ -274,7 +274,7 @@ async def _export_remote_images(project, compute_id, image_type, image, project_ try: data = await response.content.read(1024) except asyncio.TimeoutError: - raise aiohttp.web.HTTPRequestTimeout(text="Timeout when downloading image '{}' from remote compute server {}:{}".format(image, compute.host, compute.port)) + raise aiohttp.web.HTTPRequestTimeout(text="Timeout when downloading image '{}' from remote compute {}:{}".format(image, compute.host, compute.port)) if not data: break f.write(data) diff --git a/gns3server/controller/node.py b/gns3server/controller/node.py index ad54931e..8033f73c 100644 --- a/gns3server/controller/node.py +++ b/gns3server/controller/node.py @@ -41,7 +41,7 @@ class Node: def __init__(self, project, compute, name, node_id=None, node_type=None, appliance_id=None, **kwargs): """ :param project: Project of the node - :param compute: Compute server where the server will run + :param compute: Compute where the server will run :param name: Node name :param node_id: UUID of the node (integer) :param node_type: Type of emulator @@ -345,7 +345,7 @@ class Node: async def create(self): """ - Create the node on the compute server + Create the node on the compute """ data = self._node_data() data["node_id"] = self._id @@ -372,7 +372,7 @@ class Node: async def update(self, **kwargs): """ - Update the node on the compute server + Update the node on the compute :param kwargs: Node properties """ diff --git a/gns3server/handlers/api/controller/compute_handler.py b/gns3server/handlers/api/controller/compute_handler.py index ec801050..2214428a 100644 --- a/gns3server/handlers/api/controller/compute_handler.py +++ b/gns3server/handlers/api/controller/compute_handler.py @@ -31,13 +31,13 @@ log = logging.getLogger(__name__) class ComputeHandler: - """API entry points for compute server management.""" + """API entry points for compute management.""" @Route.post( r"/computes", - description="Register a compute server", + description="Register a compute", status_codes={ - 201: "Compute server added" + 201: "Compute added" }, input=COMPUTE_CREATE_SCHEMA, output=COMPUTE_OBJECT_SCHEMA) @@ -49,9 +49,9 @@ class ComputeHandler: @Route.get( r"/computes", - description="List of compute servers", + description="List of computes", status_codes={ - 200: "Compute servers list returned" + 200: "Computes list returned" }) def list(request, response): @@ -60,9 +60,9 @@ class ComputeHandler: @Route.put( r"/computes/{compute_id}", - description="Update a compute server", + description="Update a compute", status_codes={ - 200: "Compute server updated", + 200: "Compute updated", 400: "Invalid request", 404: "Instance doesn't exist" }, @@ -175,9 +175,9 @@ class ComputeHandler: @Route.get( r"/computes/{compute_id}", - description="Get a compute server information", + description="Get a compute information", status_codes={ - 200: "Compute server information returned" + 200: "Compute information returned" }, output=COMPUTE_OBJECT_SCHEMA) def get(request, response): diff --git a/gns3server/handlers/index_handler.py b/gns3server/handlers/index_handler.py index e35c6056..676d40fe 100644 --- a/gns3server/handlers/index_handler.py +++ b/gns3server/handlers/index_handler.py @@ -43,7 +43,7 @@ class IndexHandler: @Route.get( r"/compute", - description="Resources used by the GNS3 compute servers" + description="Resources used by the GNS3 computes" ) def compute(request, response): response.template("compute.html", diff --git a/gns3server/schemas/compute.py b/gns3server/schemas/compute.py index d4a74ba6..12716dad 100644 --- a/gns3server/schemas/compute.py +++ b/gns3server/schemas/compute.py @@ -89,7 +89,7 @@ COMPUTE_OBJECT_SCHEMA = { "type": ["string", "null"] }, "connected": { - "description": "Whether the controller is connected to the compute server or not", + "description": "Whether the controller is connected to the compute or not", "type": "boolean" }, "cpu_usage_percent": {