gluster / python-gluster-mgmt-client

Python bindings for gluster
GNU General Public License v3.0
5 stars 3 forks source link

[RFC] Potential code generation example #10

Open phlogistonjohn opened 6 years ago

phlogistonjohn commented 6 years ago

As an example related to the issue #9 that I recently filed I created a python file that can be run with the json file generated by gd2 listing it's endpoints as input. This script will generate python source on stdout that is very simplistic but runnable.

Because this is just a basic example of my thought process I didn't make it fit in with the existing approach, but rather to serve as a starting point for discussion. One could imagine that this is used to create a middle layer between the base class that actually implements the http methods and auth, etc. but below the final exported class which might to provide conveniences to the callers.

Please do not merge.