Hi Tyler, 

It would be good to have your client library code for the functional tests work 
as well. 
I think you have done a great work; in particular I love the api_call 
decorator, it really makes the code much more readable and maintainable. 

Are you considering some unit tests for this client library? I think we could 
have a test case in which the relevant methods of HTTP(S)Connection are stubbed 
out, with a unit test for each method decorated with @api_call. Does this make 
sense to you?

With some unit tests in place, we will be able to safely merge your branch in 
trunk. 

Salvatore

> -----Original Message-----
> From: netstack-
> bounces+salvatore.orlando=eu.citrix....@lists.launchpad.net
> [mailto:netstack-
> bounces+salvatore.orlando=eu.citrix....@lists.launchpad.net] On Behalf Of
> Brad Hall
> Sent: 13 July 2011 17:42
> To: Tyler Smith
> Cc: netstack@lists.launchpad.net
> Subject: Re: [Netstack] Quantum API Client Library Status
> 
> 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

-- 
Mailing list: https://launchpad.net/~netstack
Post to     : netstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~netstack
More help   : https://help.launchpad.net/ListHelp

Reply via email to