Skip to content

Commit bb2d895

Browse files
author
Patrick East
committed
Version 1.6.1
This includes some minor bug fixes/documentation changes and will be a point to sync between PyPI and GitHub.
1 parent 96cc4aa commit bb2d895

File tree

8 files changed

+45
-8
lines changed

8 files changed

+45
-8
lines changed

README.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ Installation
3333
$ python setup.py install
3434

3535

36+
Tests
37+
=====
38+
From the root directory of the rest-client
39+
::
40+
41+
$ PYTHONPATH=$(pwd):$PYTHONPATH py.test test/*.py
42+
43+
3644
Files
3745
=====
3846
* purestorage/ -- Contains library code.

docs/_static/README

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# This file and parent directory solely exist to suppress documentation build warnings.

docs/changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ Version Date Notes
99
1.2.0 10/16/2014 Initial Version
1010
1.4.0 12/15/2014 Add support for REST 1.3 and 1.4
1111
1.6.0 05/17/2016 Add support for REST 1.5 and 1.6
12+
1.6.1 05/30/2016 Minor bug fixes and sync code between GitHub and PyPI
1213
======= ========== =====

docs/quick_start.rst

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,10 @@ added to the hgroup as part of creation or in a subsequent set call.
105105

106106
.. code-block:: python
107107
108-
>>> array.create_host("host1", iqnlist=["iqn1", "iqn2"])
108+
>>> array.create_host("host1", iqnlist=["iqn.2001-04.com.example:diskarrays-sn-a8675308",
109+
"iqn.2001-04.com.example:diskarrays-sn-a8675309"])
109110
{
110-
u'iqn': [u'iqn1', u'iqn2'],
111+
u'iqn': [u'iqn.2001-04.com.example:diskarrays-sn-a8675308', u'iqn.2001-04.com.example:diskarrays-sn-a8675309'],
111112
u'wwn': [],
112113
u'name': u'host1'
113114
}
@@ -294,3 +295,29 @@ or explicitly eradicated.
294295
}
295296
>>> array.list_volumes(pending_only=True)
296297
[]
298+
299+
300+
Enable Secure HTTPS Requests
301+
----------------------------
302+
303+
By default the requests being made will not verify the SSL certificate of the
304+
target array. Requests made this way will log a InsecureRequestWarning.
305+
306+
To enable verification use the verify_https flag:
307+
308+
.. code-block:: python
309+
310+
>>> array = purestorage.FlashArray("localhost", "pureuser", "pureuser", verify_https=True)
311+
312+
313+
This does require that the target array has a trusted certificate and will
314+
be validated correctly by the system making the request.
315+
316+
If using an 'untrusted' certificate (e.g. self-signed certificate) you can
317+
optionally pass in a path to the certificate file:
318+
319+
.. code-block:: python
320+
321+
>>> array = purestorage.FlashArray("localhost", "pureuser", "pureuser", verify_https=True,
322+
ssl_cert="/etc/ssl/certs/pure-self-signed.crt")
323+

purestorage/purestorage.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from distutils.version import StrictVersion
1414

1515
# The current version of this library.
16-
VERSION = "1.6.0"
16+
VERSION = "1.6.1"
1717

1818

1919
class FlashArray(object):
@@ -1069,7 +1069,7 @@ def get_subnet(self, subnet):
10691069
return self._request("GET", "subnet/{0}".format(subnet))
10701070

10711071
def list_subnets(self, **kwargs):
1072-
"""Get a list of dictionaries describing each subnet.
1072+
"""Get a list of dictionaries describing subnets.
10731073
10741074
:param \*\*kwargs: See the REST API Guide on your array for the
10751075
documentation on the request:
@@ -1125,7 +1125,7 @@ def set_subnet(self, subnet, **kwargs):
11251125
return self._request("PUT", "subnet/{0}".format(subnet), kwargs)
11261126

11271127
def create_vlan_interface(self, interface, subnet, **kwargs):
1128-
"""Create a vlan interface.
1128+
"""Create a vlan interface
11291129
11301130
:param interface: Name of interface to be created.
11311131
:type interface: str

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name="purestorage",
5-
version="1.6.0",
5+
version="1.6.1",
66
description="Pure Storage FlashArray REST Client",
77
keywords=["pure", "storage", "flasharray", "rest", "client"],
88
url="",

test/__init__.py

Whitespace-only changes.

test/unit_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
import mock
77
import requests
88

9-
from pure.rest.client.purestorage import FlashArray, PureError, PureHTTPError
9+
from purestorage import FlashArray, PureError, PureHTTPError
1010

11-
CLIENT_PATH = "pure.rest.client.purestorage.purestorage"
11+
CLIENT_PATH = "purestorage.purestorage"
1212
ARRAY_OBJ = CLIENT_PATH + ".FlashArray"
1313

1414
class TestBase(object):

0 commit comments

Comments
 (0)