Isilon / isilon_sdk

Official repository for isilon_sdk. All language bindings are available for download under the 'Releases' tab.
MIT License
50 stars 21 forks source link

Fixes bugs with /nfs/netgroup, /nfs/aliases/<AID>, /cluster/timezone, and /cluster/external-ips #18

Closed apecoraro closed 8 years ago

apecoraro commented 8 years ago

The /nfs/netgroup and /cluster/timezone end points were broken because the PAPI description for each of them used "settings" instead of "properties". I added a fix for that in create_swagger_config.py.

The /nfs/aliases/ end point was broken because an NFS Alias ID is required to have a '/', but it has to be url encoded. However, Swagger's default behavior is to not url encode the '/' character in path parameters. I fixed this problem using a special parameter named 'x-isi-url-encode-path-param' that allows the to be tagged at the ProtocolsApi level so that down in the ApiClient when it goes to url encode the path parameters it can detect that it needs to use quote_plus (instead of just quote) for the tagged parameters. Currently, this functionality is needed for the ProtocolsApi get_nfs_aliase and delete_nfs_aliase functions. This behavior is implemented in the api.mustache and in api_client.mustache Swagger template files.

I also updated the model.mustache so that it works with the latest version of the Swagger Code Generator. These changes won't have any effect on older versions of the Swagger Code Generator, but will allow us to upgrade if we want.

Lastly, I added some new test code for the fixed end points.

bishopw commented 8 years ago

:+1: This looks fine to me, but I don't have merge privileges.

cbrainerd commented 8 years ago

LGTM 👍