mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 22:11:14 +02:00
The server has now 2 notification streams
* A new one for controller related events (compute, appliance templates etc.) * The existing one for project related events (links, nodes etc.)
This commit is contained in:
1 parent
dac3ba19b7
commit
7f72b90b0e
364 files changed
+12364
-9923
No files matched your search
@@ -429,7 +429,7 @@ class Controller:
|
||||
self._settings["modification_uuid"] = str(uuid.uuid4()) # We add a modification id to the settings to help the gui to detect changes
|
||||
self.save()
|
||||
self.load_appliances()
|
||||
self.notification.emit("settings.updated", val)
|
||||
self.notification.controller_emit("settings.updated", val)
|
||||
|
||||
@asyncio.coroutine
|
||||
def add_compute(self, compute_id=None, name=None, force=False, connect=True, **kwargs):
|
||||
@@ -463,12 +463,12 @@ class Controller:
|
||||
self.save()
|
||||
if connect:
|
||||
yield from compute.connect()
|
||||
self.notification.emit("compute.created", compute.__json__())
|
||||
self.notification.controller_emit("compute.created", compute.__json__())
|
||||
return compute
|
||||
else:
|
||||
if connect:
|
||||
yield from self._computes[compute_id].connect()
|
||||
self.notification.emit("compute.updated", self._computes[compute_id].__json__())
|
||||
self.notification.controller_emit("compute.updated", self._computes[compute_id].__json__())
|
||||
return self._computes[compute_id]
|
||||
|
||||
@asyncio.coroutine
|
||||
@@ -509,7 +509,7 @@ class Controller:
|
||||
yield from compute.close()
|
||||
del self._computes[compute_id]
|
||||
self.save()
|
||||
self.notification.emit("compute.deleted", compute.__json__())
|
||||
self.notification.controller_emit("compute.deleted", compute.__json__())
|
||||
|
||||
@property
|
||||
def notification(self):
|
||||
|
||||
Reference in new issue
Block a user