rest-client icon indicating copy to clipboard operation
rest-client copied to clipboard

Pure Storage FlashArray Python REST 1.X Client

Results 11 rest-client issues
Sort by recently updated
recently updated
newest added

So if I make a call to `/api/1.17/hgroup` and if there are no hgroups defined in the array ( configuration) will I receive a empty list or anything other than...

An option to use different rest_versions is apart of the purestorage.FlashArray() but it wont accept anything higher than 1.19. Traceback (most recent call last): File "/repo/my_tests.py", line 94, in client...

to get details from the Array itself, e.g. purearray space etc.

Add () for print to make it python3 compatible.

I left a comment on the commit introducing it: https://github.com/PureStorage-OpenConnect/rest-client/commit/30231639d7d700682c6ee054426c968c8cbbcfcb#r40240923

The default is not to verify SSL certificates which then results in the below warnings being printed: .venv/lib64/python3.6/site-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly...

Without the fix FlashArray() call fails with: ... File ".../.venv/lib64/python3.6/site-packages/purestorage/purestorage.py", line 169, in _request raise PureError(err.message) AttributeError: 'SSLError' object has no attribute 'message'

The ConnectionError object from request.exceptions.RequestException does not contain the 'message' attribute. This causes and exception when trying to handle these exceptions. Fixed by using 'args' to get the inner exception.

This is new as of 3.6 per https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior I had trouble running the tests on 3.7, are they expected to be in a good state?

So testing the lib I found out there is no catching for timeout exception (i.e. the cluster is down, the IP is wrong, etc.), this PR fixes that. ``` >>>...