This looks great so far. I haven't done a thorough review of the code but from a quick initial inspection it looks like the direction we want to go. It certainly makes the tests a lot cleaner :)
Thanks for doing this! -Brad On Wed, Jul 13, 2011 at 7:16 AM, Tyler Smith <tyles...@cisco.com> wrote: > Hi, > > I have a working branch > (https://blueprints.launchpad.net/quantum/+spec/quantum-client-library) of a > Python API client library for Quantum. > > It's a refactoring of the MiniClient which makes the use of the library a > lot cleaner and simpler. As a small example, tests went from this: > > client = Client(HOST, PORT, USE_SSL) > content_type = "application/" + format > body = Serializer().serialize(test_network_data, content_type) > res = client.do_request(TENANT_ID,'POST',"/networks."+format, body=body) > > To: > > client = Client(HOST, PORT, USE_SSL, TENANT_ID, format) > res = client.create_network(test_network_data) > > All high level API functions such as list_networks, create_network, > list_ports, etc, are represented. The test_scripts/tests.py script is > completely rewritten with the new library, and the quantum/cli.py CLI is > almost finished. > > The do_request method is unchanged, so for now at least there is backward > compatibility with the old style of requests. > > Data is automatically serialized, however due to some issues with the JSON > deserializer automatic deserialization isn't working yet. > > In the next few days I'll be working on getting the > serialization/deserialization working perfectly and getting the > quantum/cli.py CLI completely switched over to the new library. After that > I'll work on figuring out how to best manage data added by plugins. > > I would love to get some feedback about things that should be changed, > added, or removed. > > Thanks, > -Tyler Smith > > -- > Mailing list: https://launchpad.net/~netstack > Post to : netstack@lists.launchpad.net > Unsubscribe : https://launchpad.net/~netstack > More help : https://help.launchpad.net/ListHelp > -- Mailing list: https://launchpad.net/~netstack Post to : netstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~netstack More help : https://help.launchpad.net/ListHelp