Skip to content

Commit 7f96f39

Browse files
authored
Release 1.74.0 (#208)
1 parent 4dcfcad commit 7f96f39

File tree

966 files changed

+293130
-23616
lines changed

Some content is hidden

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

966 files changed

+293130
-23616
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.73.1"
3+
version = "1.74.0"
44
description = "Pure Storage Python clients for FlashArray, FlashBlade, and Pure1 APIs"
55
authors = [
66
{ name = "Pure Storage", email = "support@purestorage.com" }

pypureclient/_transport/configuration.py

Lines changed: 4 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -172,75 +172,14 @@ def auth_settings(self):
172172
173173
:return: The Auth Settings information dict.
174174
"""
175-
auth = {}
176-
if 'AuthorizationHeader' in self.api_key:
177-
auth['AuthorizationHeader'] = {
178-
'type': 'api_key',
179-
'in': 'header',
180-
'key': 'Authorization',
181-
'value': self.get_api_key_with_prefix(
182-
'AuthorizationHeader',
183-
),
184-
}
185-
return auth
186-
def get_host_settings(self):
187-
"""Gets an array of host settings
188-
189-
:return: An array of host settings
190-
"""
191-
return [
192-
{
193-
'url': "https://api-staging.pure1.purestorage.com",
194-
'description': "No description provided",
195-
}
196-
]
197-
198-
def get_host_from_settings(self, index, variables=None, servers=None):
199-
"""Gets host URL based on the index and variables
200-
:param index: array index of the host settings
201-
:param variables: hash of variable and the corresponding value
202-
:param servers: an array of host settings or None
203-
:return: URL based on host settings
204-
"""
205-
if index is None:
206-
return self._base_path
207-
208-
variables = {} if variables is None else variables
209-
servers = self.get_host_settings() if servers is None else servers
210-
211-
try:
212-
server = servers[index]
213-
except IndexError:
214-
raise ValueError(
215-
"Invalid index {0} when selecting the host settings. "
216-
"Must be less than {1}".format(index, len(servers)))
217-
218-
url = server['url']
219-
220-
# go through variables and replace placeholders
221-
for variable_name, variable in server.get('variables', {}).items():
222-
used_value = variables.get(
223-
variable_name, variable['default_value'])
224-
225-
if 'enum_values' in variable \
226-
and used_value not in variable['enum_values']:
227-
raise ValueError(
228-
"The variable `{0}` in the host URL has invalid value "
229-
"{1}. Must be {2}.".format(
230-
variable_name, variables[variable_name],
231-
variable['enum_values']))
232-
233-
url = url.replace("{" + variable_name + "}", used_value)
234-
235-
return url
175+
return {}
236176

237177
@property
238178
def host(self):
239-
"""Return generated host."""
240-
return self.get_host_from_settings(self.server_index, variables=self.server_variables)
179+
"""Return base path."""
180+
return self._base_path
241181

242182
@host.setter
243183
def host(self, value):
244184
"""Fix base path."""
245-
self._base_path = value
246-
self.server_index = None
185+
self._base_path = value

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.73.1'
2+
__version__ = '1.74.0'
33
__default_user_agent__ = 'pure/{}/{}'.format(__name__, __version__)

pypureclient/flasharray/FA_2_0/client.py

Lines changed: 52 additions & 37 deletions
Large diffs are not rendered by default.

pypureclient/flasharray/FA_2_1/client.py

Lines changed: 127 additions & 112 deletions
Large diffs are not rendered by default.

pypureclient/flasharray/FA_2_10/client.py

Lines changed: 340 additions & 325 deletions
Large diffs are not rendered by default.

pypureclient/flasharray/FA_2_11/client.py

Lines changed: 347 additions & 332 deletions
Large diffs are not rendered by default.

pypureclient/flasharray/FA_2_13/client.py

Lines changed: 347 additions & 332 deletions
Large diffs are not rendered by default.

pypureclient/flasharray/FA_2_14/client.py

Lines changed: 349 additions & 334 deletions
Large diffs are not rendered by default.

pypureclient/flasharray/FA_2_15/client.py

Lines changed: 353 additions & 338 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)