hybi-13 is the rfc version. the library jujuclient is using also has a python3 variant.
On Mon, Feb 10, 2014 at 8:02 PM, Adam Stokes <[email protected]> wrote: > I tried a python3 variant that uses ws4py which is RFC 6455 compliant > and can not seem to get the login to work: > > # OUtput > connection opened > > {'RequestId': 1, 'Response': {}} > > > # Code > #!/usr/bin/python3 > > > from ws4py.client.threadedclient import WebSocketClient > from pprint import pprint > import json > > params = {} > params['Type'] = "Admin" > params['Request'] = 'Login' > params['RequestId'] = 1 > params['Params'] = { 'AuthTag' : 'user-admin', 'Password': > 'f0d44f279b47cc8b5f7ea291f5e3b30a'} > > class DummyClient(WebSocketClient): > def opened(self): > print("connection opened") > self.send(json.dumps(params)) > > def closed(self, code, reason): > print ("Closed down", code, reason) > > def received_message(self, m): > pprint(json.loads(m.data.decode('utf-8'))) > return m > > if __name__ == '__main__': > try: > ws = DummyClient('wss://192.168.122.16:17070/', > protocols=['https-only']) > ws.connect() > # info = {'Type': 'Client', > # 'Request': 'EnvironmentInfo'} > # ws.send(json.dumps(info)) > except KeyboardInterrupt: > ws.close() > > > The library that Kapil uses in the jujuclient only supports hybi-13. > So I'm curious if juju supports anything beyond that? > > -- > [ Adam Stokes ] > > -- > Juju mailing list > [email protected] > Modify settings or unsubscribe at: > https://lists.ubuntu.com/mailman/listinfo/juju >
-- Juju mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju
