Skip to content

Commit

Permalink
- include 1.17 change
Browse files Browse the repository at this point in the history
- update documentation
  • Loading branch information
szhou0116 committed Nov 6, 2019
1 parent e2e1d6a commit a9b3755
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 34 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ This library requires the use of python 2.6 or later and the third-party
library "requests".

Additionally, this library can only be used communicate with FlashArrays that
support one or more REST API versions between 1.0 and 1.17; currently, this
support one or more REST API versions between 1.0 and 1.18; currently, this
includes any FlashArray running Purity 3.4.0 or later.


Capabilities
============
This library supports all functionality offered by FlashArray REST API versions from 1.0 up to 1.17.
This library supports all functionality offered by FlashArray REST API versions from 1.0 up to 1.18.

Note that different versions of the REST API offer different functionality, and
some operations may be unusable except on certain versions of the REST API. For
Expand Down
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ Version Date Notes
1.14.1 07/09/2018 Add support for managing offload targets.
1.16.0 10/26/2018 Add support for REST 1.15 and 1.16
1.17.0 08/23/2019 Add support for REST 1.17
1.18.0 11/05/2019 Add support for REST 1.18
======= ========== =====
26 changes: 13 additions & 13 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
# built documents.
#
# The short X.Y version.
version = '1.17'
version = '1.18'
# The full version, including alpha/beta/rc tags.
release = '1.17.0'
release = '1.18.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -174,21 +174,21 @@
# -- Options for LaTeX output --------------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#'preamble': '',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'PureStorageRESTClient.tex', u'Pure Storage REST Client Documentation',
u'Pure Storage', 'manual'),
('index', 'PureStorageRESTClient.tex', u'Pure Storage REST Client Documentation',
u'Pure Storage', 'manual'),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -231,9 +231,9 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'PureStorageRESTClient', u'Pure Storage REST Client Documentation',
u'Pure Storage', 'PureStorageRESTClient', 'One line description of project.',
'Miscellaneous'),
('index', 'PureStorageRESTClient', u'Pure Storage REST Client Documentation',
u'Pure Storage', 'PureStorageRESTClient', 'One line description of project.',
'Miscellaneous'),
]

# Documents to append as an appendix to all manuals.
Expand Down
44 changes: 27 additions & 17 deletions purestorage/purestorage.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def set_eula(self, **kwargs):
:param \*\*kwargs: See the REST API Guide on your array for the
documentation on the request:
**PUT eula**
**PUT array/eula**
:returns: EULA agreement and a dictionary describing the EULA
acceptance status on the array.
:rtype: ResponseDict
Expand Down Expand Up @@ -1177,7 +1177,7 @@ def connect_nfs_offload(self, name, **kwargs):
:type name: str
:param \*\*kwargs: See the REST API Guide on your array for the
documentation on the request:
**POST offload/nfs/{}**
**POST nfs_offload/{}**
:type \*\*kwargs: optional
:returns: A dictionary describing the nfs target.
Expand All @@ -1193,7 +1193,7 @@ def connect_s3_offload(self, name, **kwargs):
:type name: str
:param \*\*kwargs: See the REST API Guide on your array for the
documentation on the request:
**POST offload/s3/{}**
**POST s3_offload/{}**
:type \*\*kwargs: optional
:returns: A dictionary describing the S3 target.
Expand Down Expand Up @@ -1273,7 +1273,7 @@ def list_nfs_offload(self, **kwargs):
:param \*\*kwargs: See the REST API Guide on your array for the
documentation on the request:
**GET offload/nfs**
**GET nfs_offload**
:type \*\*kwargs: optional
:returns: A list of dictionaries describing NFS offload connections.
Expand All @@ -1287,7 +1287,7 @@ def list_s3_offload(self, **kwargs):
:param \*\*kwargs: See the REST API Guide on your array for the
documentation on the request:
**GET offload/s3**
**GET s3_offload**
:type \*\*kwargs: optional
:returns: A list of dictionaries describing S3 offload connections.
Expand All @@ -1301,7 +1301,7 @@ def list_azure_offload(self, **kwargs):
:param \*\*kwargs: See the REST API Guide on your array for the
documentation on the request:
**GET offload/azure**
**GET azure_offload**
:type \*\*kwargs: optional
:returns: A list of dictionaries describing Azure Blob offload connections.
Expand Down Expand Up @@ -1339,7 +1339,7 @@ def get_nfs_offload(self, name, **kwargs):
:type offload: str
:param \*\*kwargs: See the REST API Guide on your array for the
documentation on the request:
**GET offload/nfs/::offload**
**GET nfs_offload/::offload**
:type \*\*kwargs: optional
:returns: A dictionary describing the nfs offload connection.
Expand All @@ -1361,7 +1361,7 @@ def get_s3_offload(self, name, **kwargs):
:type offload: str
:param \*\*kwargs: See the REST API Guide on your array for the
documentation on the request:
**GET offload/s3/::offload**
**GET s3_offload/::offload**
:type \*\*kwargs: optional
:returns: A dictionary describing the S3 offload connection.
Expand All @@ -1377,7 +1377,7 @@ def get_azure_offload(self, name, **kwargs):
:type offload: str
:param \*\*kwargs: See the REST API Guide on your array for the
documentation on the request:
**GET offload/azure/::offload**
**GET azure_offload/::offload**
:type \*\*kwargs: optional
:returns: A dictionary describing the Azure Blob offload connection.
Expand Down Expand Up @@ -1419,6 +1419,10 @@ def get_network_interface(self, interface, **kwargs):
:param interface: Name of network interface to get information about.
:type interface: str
:param \*\*kwargs: See the REST API Guide on your array for the
documentation on the request:
**GET network/:network_component**
:type \*\*kwargs: optional
:returns: A dictionary describing the interface.
:rtype: ResponseDict
Expand All @@ -1429,6 +1433,11 @@ def get_network_interface(self, interface, **kwargs):
def list_network_interfaces(self, **kwargs):
"""Get a list of dictionaries describing network interfaces.
:param \*\*kwargs: See the REST API Guide on your array for the
documentation on the request:
**GET network**
:type \*\*kwargs: optional
:returns: A list of dictionaries describing each network interface.
:rtype: ResponseList
Expand Down Expand Up @@ -3527,6 +3536,10 @@ def get_kmip(self, name, **kwargs):
:param name: The name of the KMIP config to operate on.
:type name: string
:param \*\*kwargs: See the REST API Guide on your array for the
documentation on the request:
**GET kmip/:kmip**
:type \*\*kwargs: optional
:returns: A list of dictionaries containing the requested kmip configuration.
:rtype: ResponseList
Expand Down Expand Up @@ -3760,8 +3773,6 @@ def get_app_node(self, app_name, **kwargs):
def schedule_maintenance_window(self, **kwargs):
"""Schedule a maintenance window and return a dictionary describing it.
:param name: Name of the maintenance window to be scheduled.
:type name: str
:param \*\*kwargs: See the REST API Guide on your array for the
documentation on the request:
**POST maintenance_window**
Expand All @@ -3771,20 +3782,20 @@ def schedule_maintenance_window(self, **kwargs):
:rtype: ResponseDict
"""

return self._request("POST", "maintenance_window", kwargs)

def unschedule_maintenance_window(self, **kwargs):
"""Unschedule a maintenance window and return a dictionary describing it.
:param name: Name of the maintenance window to be unscheduled.
:type name: str
:param \*\*kwargs: See the REST API Guide on your array for the
documentation on the request:
**DELETE maintenance_window**
:type \*\*kwargs: optional
:returns: A dictionary describing the unscheduled maintenance window.
:rtype: ResponseDict
"""

return self._request("DELETE", "maintenance_window", kwargs)

def list_maintenance_windows(self, **kwargs):
Expand Down Expand Up @@ -3924,7 +3935,7 @@ class PureError(Exception):
"""
def __init__(self, reason):
self.reason = reason
super(PureError, self).__init__()
super(PureError, self).__init__(reason)

def __str__(self):
return "PureError: {0}".format(self.reason)
Expand Down Expand Up @@ -3971,4 +3982,3 @@ def __str__(self):
"version {1} at {2}: {3}\n{4}")
return msg.format(self.code, self.rest_version, self.target,
self.reason, self.text)

4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

setup(
name="purestorage",
version="1.17.0",
version="1.18.0",
description="Pure Storage FlashArray REST Client",
keywords=["pure", "storage", "flasharray", "rest", "client"],
url="https://github.com/purestorage/rest-client",
download_url="https://github.com/purestorage/rest-client/archive/1.17.0.tar.gz",
download_url="https://github.com/purestorage/rest-client/archive/1.18.0.tar.gz",
author="Pure Storage",
author_email = "wes@purestorage.com",
license="BSD 2-Clause",
Expand Down

0 comments on commit a9b3755

Please sign in to comment.