Skip to content

Commit 1a46022

Browse files
authored
Release 1.69.0 (#185)
1 parent 6b7b2bb commit 1a46022

File tree

967 files changed

+312597
-45941
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

967 files changed

+312597
-45941
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "py-pure-client"
3-
version = "1.68.0"
3+
version = "1.69.0"
44
description = "Pure Storage Python clients for FlashArray, FlashBlade, and Pure1 APIs"
55
authors = [
66
{ name = "Pure Storage", email = "[email protected]" }

pypureclient/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
__name__ = 'py-pure-client'
2-
__version__ = '1.68.0'
2+
__version__ = '1.69.0'
33
__default_user_agent__ = 'pure/{}/{}'.format(__name__, __version__)

pypureclient/api_token_manager.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class APITokenManager(object):
1212
A valid session token is stored in memory.
1313
"""
1414

15-
def __init__(self, token_endpoint, api_token, verify_ssl=True, token_dispose_endpoint=None, user_agent=None):
15+
def __init__(self, token_endpoint, api_token, verify_ssl=True, token_dispose_endpoint=None, user_agent=None, timeout=None):
1616
"""
1717
Initialize a APITokenManager. Should be treated as a static object.
1818
@@ -30,6 +30,7 @@ def __init__(self, token_endpoint, api_token, verify_ssl=True, token_dispose_end
3030
self._verify_ssl = verify_ssl
3131
self._session_token = None
3232
self._user_agent = user_agent
33+
self._timeout = timeout
3334
self.get_session_token(refresh=True)
3435
# Register a function to close the session when the program exits
3536
atexit.register(self.close_session)
@@ -68,7 +69,7 @@ def _request_session_token(self):
6869
Headers.user_agent: self._user_agent,
6970
Headers.x_request_id: str(uuid.uuid4())
7071
}
71-
response = requests.post(self._token_endpoint, headers=post_headers, verify=self._verify_ssl)
72+
response = requests.post(self._token_endpoint, headers=post_headers, verify=self._verify_ssl, timeout=self._timeout)
7273
if response.status_code == requests.codes.ok:
7374
return str(response.headers[Headers.x_auth_token])
7475
else:
@@ -86,7 +87,7 @@ def close_session(self):
8687
Headers.user_agent: self._user_agent,
8788
Headers.x_request_id: str(uuid.uuid4())
8889
}
89-
requests.post(self._token_dispose_endpoint, headers=delete_headers, verify=self._verify_ssl)
90+
requests.post(self._token_dispose_endpoint, headers=delete_headers, verify=self._verify_ssl, timeout=self._timeout)
9091
self._session_token = None
9192
except:
9293
pass

pypureclient/client_settings.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import requests
22
import uuid
33

4+
from typing import Union, Tuple
45
from .keywords import Headers
56

67

@@ -11,11 +12,12 @@ def resolve_ssl_validation(verify_ssl):
1112
return verify_ssl if verify_ssl is not None else False
1213

1314

14-
def get_target_versions(target, target_type, key_to_check, verify_ssl=None):
15+
def get_target_versions(target, target_type, key_to_check, verify_ssl=None, timeout: Union[int, Tuple[float, float]]=None):
1516
from ._version import __default_user_agent__
1617
from . import PureError
1718
url = 'https://{target}/api/api_version'.format(target=target)
1819
response = requests.get(url,
20+
timeout=timeout,
1921
verify=resolve_ssl_validation(verify_ssl),
2022
headers={
2123
Headers.user_agent: __default_user_agent__,

pypureclient/flasharray/FA_2_0/client.py

Lines changed: 79 additions & 78 deletions
Large diffs are not rendered by default.

pypureclient/flasharray/FA_2_1/client.py

Lines changed: 253 additions & 252 deletions
Large diffs are not rendered by default.

pypureclient/flasharray/FA_2_10/client.py

Lines changed: 730 additions & 729 deletions
Large diffs are not rendered by default.

pypureclient/flasharray/FA_2_11/client.py

Lines changed: 743 additions & 742 deletions
Large diffs are not rendered by default.

pypureclient/flasharray/FA_2_13/client.py

Lines changed: 743 additions & 742 deletions
Large diffs are not rendered by default.

pypureclient/flasharray/FA_2_14/client.py

Lines changed: 751 additions & 750 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)