Closed jmanteau closed 1 year ago
@jmanteau - good idea. I will work on this update probably in the next week or so. We are also in the process of upgrading our IP Fabric systems to v5, so we need this too :-)
@jmanteau - I have not forgotten about this. I am just now working on the migration. If you would like to offer any suggestions/approaches please let me know. Otherwise my plan was to allow the Caller to provide a base_url
value that would be used directly by the client - meaning that the Caller would include the /api/v5
path directly. Any objections with that approach?
@jmanteau - I've learned that as of IPF version 5, the API supports a non-version endpoint that will return the version.
In [7]: res = await ipf.api.get('/version')
In [8]: res.json()
Out[8]: {'apiVersion': 'v5.0', 'releaseVersion': '5.0.2+5'}
I will use this as part of the login()
method so that the Caller is not required to provide the API substring in the constructor.
Hello, this is a very good idea !
@jmanteau - cool. I've got a PR that I am reviewing, and I should have this code merged and pushed to PyPI later today.
Hello,
In: https://github.com/jeremyschulman/aio-ipfabric/blob/7e676674a274096b0ffa419ed549c766e85e3724/aioipfabric/consts.py#L40
we have API_VER = "/api/v1/"
whereas the current version of the API is v5. It is quite easy to override this in the code but perhaps it can be interesting to offer a way to setup this at class init ?
Julien