Colleagues,
I'm developing a set of Ansible modules, intended to automate certain aspects of FreeNAS integration. I'm testing with FreeNAS 11.2, and it looks like, that API v2.0 is still catching up with v1.0. For example, this is a valid v1.0 call:
In comparison, approximately the same call is failing in v2.0:
So, the question for the experts: is it's worth a hassle right now to develop using v2.0 of API or better to write for API v1.0 and try to isolate API-dependent calls for future upgrade?
And another tricky question: I've written the user management module for freenas using v1.0 of API (i'll soon publish on github, as it's production tested :D), and POST calls are very-very-very slow with it, though getting through. Does anybody know, is there any improvement in this domain (speed of POST calls processing) with v2.0 API and FreeNAS 11.2?
Thank you in advance and have a good day!
I'm developing a set of Ansible modules, intended to automate certain aspects of FreeNAS integration. I'm testing with FreeNAS 11.2, and it looks like, that API v2.0 is still catching up with v1.0. For example, this is a valid v1.0 call:
Code:
$ curl -u 'user:password' 'https://storage.local/api/v1.0/storage/dataset/tank/test/' 2>/dev/null | jshon { "atime": "off", "avail": 502817193984, "comments": null, "compression": "lz4", "dedup": "off", "exec": "on", "inherit_props": [ "compression", "aclmode", "aclinherit", "dedup", "org.freebsd.ioc:active" ], "mountpoint": "\/mnt\/tank\/test", "name": "tank\/test", "pool": "tank", "quota": 0, "readonly": "off", "recordsize": 131072, "refer": 34053718016, "refquota": 536870912000, "refreservation": 0, "reservation": 0, "sync": "standard", "used": 34053718016 }
In comparison, approximately the same call is failing in v2.0:
Code:
$ curl -u 'user:password' 'https://storage.local/api/v2.0/pool/dataset/id/tank/test' 404: Not Found
So, the question for the experts: is it's worth a hassle right now to develop using v2.0 of API or better to write for API v1.0 and try to isolate API-dependent calls for future upgrade?
And another tricky question: I've written the user management module for freenas using v1.0 of API (i'll soon publish on github, as it's production tested :D), and POST calls are very-very-very slow with it, though getting through. Does anybody know, is there any improvement in this domain (speed of POST calls processing) with v2.0 API and FreeNAS 11.2?
Thank you in advance and have a good day!