Extract the notification part of controller to a dedicated class

This commit is contained in:
Julien Duponchelle committed 2016-05-18 14:56:23 +02:00
1 parent d86cefaaeb
commit 694e1a2e68
10 files changed
+162 -106

No files matched your search

+1 -1
View File
@@ -196,7 +196,7 @@ class Compute:
msg = json.loads(response.data)
action = msg.pop("action")
event = msg.pop("event")
self._controller.emit(action, event, compute_id=self.id, **msg)
self._controller.notification.emit(action, event, compute_id=self.id, **msg)
def _getUrl(self, path):
return "{}://{}:{}/v2/compute{}".format(self._protocol, self._host, self._port, path)