purestorage-openconnect / rest-client Goto Github PK
View Code? Open in Web Editor NEWPure Storage FlashArray Python REST 1.X Client
License: BSD 2-Clause "Simplified" License
Pure Storage FlashArray Python REST 1.X Client
License: BSD 2-Clause "Simplified" License
copy_volume
is handy for copying. But it works only with existing volume (in local array). Can you make it capable for copying the snapshot (from protection group) as a new volume, please?
When copy_volume is used to copy snapshot from protection group, it will say that the volume doesn't exist:
[
{
"pure_err_key": "err.friendly",
"code": 6,
"ctx": "remote_host_logs_volume",
"pure_err_code": 1,
"msg": "Volume does not exist."
}
]
Thanks
Hey there, reading the REST and notice "Documentation" is misspelled in the title on this page:
https://github.com/purestorage/rest-client/blob/master/docs/index.rst
I left a comment on the commit introducing it: 3023163#r40240923
I am having timeout issues collecting pure device data using the sdk.
Please add the ability to set a timeout value for request calls.
FlashArray(target=ip, username=user, password=password, timeout=90)
def _request(self, method, path, data=None, reestablish_session=True):
"""Perform HTTP request for REST API."""
...
response = requests.request(method, url, data=body, headers=headers,
cookies=self._cookies, **self._request_kwargs)
response = requests.request(method, url, data=body, headers=headers,
cookies=self._cookies, timeout=self._timeout, **self._request_kwargs)
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 that?
I have a configuration who has hgroups defined ( but not the case that I want to know)
Noticed when running purestorage.VERSION, we are seeing 1.14.0
The git logs show 1.14.1
rest-client/purestorage/purestorage.py
VERSION = '1.14.0'
should be updated to
VERSION = '1.14.1'
In the UI I can see a MW (Mirror Write?) latency. Which of the variables in the api allow me to retrieve the same values?
Where / how can I get the network interface throughput and latencies?
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 = get_single_array()
File "/repo/my_tests.py", line 33, in get_single_array
array = purestorage.FlashArray('10.246.95.26',
File "/usr/local/lib/python3.9/site-packages/purestorage/purestorage.py", line 141, in init
self._rest_version = self._check_rest_version(rest_version)
File "/usr/local/lib/python3.9/site-packages/purestorage/purestorage.py", line 214, in _check_rest_version
raise ValueError(msg.format(version))
ValueError: Library is incompatible with REST API version 1.20
Considering the rest client relies on requests it would be good to allow users to redefine the timeout parameter.
Receive the error "'ConnectionError' object has no attribute 'message'" when a Pure System request times out. It appears to be occurring at line 147 in purestorage.py --- raise PureError(err.message)
This is in version 1.11.3.
Please let me know if I can assist or answer any questions.
Thanks,
Garry
Hi,
Is there any work being done to add support for Purity API versions 2.0+?
It would be great if we could use this SDK to use the new and improved REST API version, not least to be able to authenticate using the more secure OAuth2 method.
While connecting to array, we are getting below error.
#array = purestorage.FlashArray("xxxxxxxxxxxx", "pureuser", "pureuser")
Traceback (most recent call last):
File "", line 1, in
File "/opt/anaconda3/lib/python3.7/site-packages/purestorage/purestorage.py", line 138, in init
self._rest_version = self._choose_rest_version()
File "/opt/anaconda3/lib/python3.7/site-packages/purestorage/purestorage.py", line 217, in _choose_rest_version
versions = self._list_available_rest_versions()
File "/opt/anaconda3/lib/python3.7/site-packages/purestorage/purestorage.py", line 231, in _list_available_rest_versions
return data["version"]
KeyError: 'version'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.