+ """Connect to the websocket.
+
+ If uuid is None, the connection will be to the controller. Otherwise it
+ will be to the model.
+
+ """
+ if uuid:
+ url = "wss://{}/model/{}/api".format(endpoint, uuid)
+ else:
+ url = "wss://{}/api".format(endpoint)
+ client = cls(endpoint, uuid, username, password, cacert)