2016-06-21 08:47:22 +00:00
|
|
|
General
|
|
|
|
################
|
|
|
|
|
2016-06-23 08:09:21 +00:00
|
|
|
Architecture
|
|
|
|
============
|
|
|
|
|
|
|
|
GNS3 is splitted in four part:
|
|
|
|
|
|
|
|
* the GUI (project gns3-gui, gns3-web)
|
|
|
|
* the controller (project gns3-server)
|
|
|
|
* the compute (project gns3-server)
|
|
|
|
* the emulators (qemu, iou, dynamips...)
|
|
|
|
|
|
|
|
|
|
|
|
The controller pilot everything it's the part that manage the state
|
2016-06-24 06:00:22 +00:00
|
|
|
of a project, save it on disk. Only one controller exists.
|
2016-06-23 08:09:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
The GUI display the topology. The GUI has only direct contact with
|
|
|
|
the controller.
|
|
|
|
|
|
|
|
The compute are where emulator are executed. If the compute is on
|
|
|
|
the same server as the controller, they are in the same process.
|
|
|
|
|
|
|
|
|
|
|
|
For each node of the topology will start an emulator instance.
|
|
|
|
|
|
|
|
|
|
|
|
A small schema::
|
|
|
|
|
|
|
|
+---------------+ +----------+ +------+
|
|
|
|
| | | COMPUTE +-----> QEMU |
|
|
|
|
| GNS3 GUI | +---> SERVER 1 | +------+
|
|
|
|
| QT interface +-----+ | +----------+
|
|
|
|
| | | | +---+
|
|
|
|
+---------------+ +v--------++ +--->IOU|
|
|
|
|
|CONTROLLER| | +---+
|
|
|
|
+---------+ +^--------++ +---------+ |
|
|
|
|
| GNS3 WEB+-----+ | | COMPUTE +--+
|
|
|
|
+---------+ +---> SERVER 2+--+ +--------+
|
|
|
|
+---------+ +--->DYNAMIPS|
|
|
|
|
+--------+
|
|
|
|
|
|
|
|
|
|
|
|
If you want to pilot GNS3 you need to use the controller API.
|
|
|
|
|
|
|
|
|
2015-02-18 10:06:13 +00:00
|
|
|
Communications
|
|
|
|
===============
|
|
|
|
|
|
|
|
All the communication are done over HTTP using JSON.
|
|
|
|
|
2015-01-14 00:05:26 +00:00
|
|
|
Errors
|
|
|
|
======
|
|
|
|
|
|
|
|
In case of error a standard HTTP error is raise and you got a
|
|
|
|
JSON like that
|
|
|
|
|
|
|
|
.. code-block:: json
|
|
|
|
|
|
|
|
{
|
|
|
|
"status": 409,
|
|
|
|
"message": "Conflict"
|
|
|
|
}
|
2015-02-25 08:47:55 +00:00
|
|
|
|
2016-06-08 16:12:22 +00:00
|
|
|
409 error could be display to the user. They are normal behavior
|
|
|
|
they are used to warn user about something he should change and
|
|
|
|
they are not an internal software error.
|
|
|
|
|
|
|
|
|
2015-02-25 08:47:55 +00:00
|
|
|
Limitations
|
|
|
|
============
|
|
|
|
|
|
|
|
Concurrency
|
|
|
|
------------
|
|
|
|
|
2016-05-12 17:18:37 +00:00
|
|
|
A node can't process multiple request in the same time. But you can make
|
|
|
|
multiple request on multiple node. It's transparent for the client
|
|
|
|
when the first request on a Node start a lock is acquire for this node id
|
2015-02-25 08:47:55 +00:00
|
|
|
and released for the next request at the end. You can safely send all
|
|
|
|
the requests in the same time and let the server manage an efficent concurrency.
|
|
|
|
|
|
|
|
We think it can be a little slower for some operations, but it's remove a big
|
2016-05-12 17:18:37 +00:00
|
|
|
complexity for the client due to the fact only some command on some node can be
|
2015-02-25 08:47:55 +00:00
|
|
|
concurrent.
|
|
|
|
|
|
|
|
|
2016-03-25 16:35:55 +00:00
|
|
|
Authentication
|
2015-02-25 09:29:20 +00:00
|
|
|
-----------------
|
|
|
|
|
2016-04-18 18:55:22 +00:00
|
|
|
You can use HTTP basic auth to protect the access to the API. And run
|
|
|
|
the API over HTTPS.
|
2015-02-25 09:29:20 +00:00
|
|
|
|
|
|
|
|
2015-06-26 12:41:58 +00:00
|
|
|
Notifications
|
|
|
|
=============
|
|
|
|
|
2016-03-17 14:15:30 +00:00
|
|
|
You can receive notification from the server if you listen the HTTP stream /notifications or the websocket.
|
2015-06-26 12:41:58 +00:00
|
|
|
|
|
|
|
The available notification are:
|
2016-03-17 14:15:30 +00:00
|
|
|
* ping
|
2016-05-23 16:44:20 +00:00
|
|
|
* compute.created
|
|
|
|
* compute.updated
|
|
|
|
* compute.deleted
|
2016-05-12 17:18:37 +00:00
|
|
|
* node.created
|
|
|
|
* node.updated
|
|
|
|
* node.deleted
|
2016-05-18 16:37:18 +00:00
|
|
|
* link.created
|
|
|
|
* link.updated
|
|
|
|
* link.deleted
|
2016-06-23 09:17:23 +00:00
|
|
|
* drawing.created
|
|
|
|
* drawing.updated
|
|
|
|
* drawing.deleted
|
2016-03-17 14:15:30 +00:00
|
|
|
* log.error
|
2016-03-18 15:55:54 +00:00
|
|
|
* log.warning
|
2016-04-18 19:15:24 +00:00
|
|
|
* log.info
|
2016-06-29 12:18:38 +00:00
|
|
|
* settings.updated
|
2015-06-26 12:41:58 +00:00
|
|
|
|
2016-03-07 16:57:12 +00:00
|
|
|
Previous versions
|
|
|
|
=================
|
|
|
|
|
|
|
|
API version 1
|
|
|
|
-------------
|
2016-06-16 07:11:50 +00:00
|
|
|
Shipped with GNS3 1.3, 1.4 and 1.5.
|
|
|
|
This API doesn't support the controller system and save used a commit system instead of live save.
|
2016-03-07 16:57:12 +00:00
|
|
|
|