- client.info = response.copy()
- client.build_facades(response.get('facades', {}))
- client.loop.create_task(client.pinger())
- client.monitor.pinger_stopped.clear()
+ self.info = response.copy()
+ self.build_facades(response.get('facades', {}))
+ self.loop.create_task(self.pinger())
+ self.monitor.pinger_stopped.clear()
+
+ @classmethod
+ async def connect(
+ cls, endpoint, uuid, username, password, cacert=None,
+ macaroons=None, loop=None, max_frame_size=None):
+ """Connect to the websocket.
+
+ If uuid is None, the connection will be to the controller. Otherwise it
+ will be to the model.