QuantumClientLibrary

Design is for a python code library that makes it easier to build Quantum clients.

This library would be used by the CLI, GUI, unit tests, and other "orchestration" components (e.g., batch_config.py).

The idea is to avoid duplicate code across clients. The client library could handle:


 * functionality currently in "MiniClient" class
 * serialization / deserialization of data
 * identifying API errors/failures, raising Exceptions.
 * authentication (once this is completed on the server side (see: https://blueprints.launchpad.net/quantum/+spec/quantum-api-auth)
 * info-level logging (perhaps?)

We envision that this library would have a method for each high-level API operation, such as:

create_network(tenant-id, net-info...) get_network(tenant-id, net-id) delete_network(tenant-id, net-id) ....

One interesting question is how to structure this library so that it continues to work even when extensions are used, particularly "data extensions" that add a new field to an existing object like a Port. For example, an extension might add a field "acls" to a Port object that contains a list of string ACL representations.

One approach would be for the client library to have objects that represent each API entity (currently networks and ports) and have all methods accept and return these objects. These objects would have the logic to serialize/deserialize the "default" API objects and also provide a way for additional extension specific serialization/deserialization logic to be run to serialize/deserialize additional fields beyond the default. This probably warrants some additional discussion.