Skip to content

Commit

Permalink
Merge pull request #68 from rlucan-ps/fb-restapi-2-11
Browse files Browse the repository at this point in the history
Release 1.41.0 Added FlashBlade REST 2.11
  • Loading branch information
rlucan-ps authored Sep 21, 2023
2 parents d9d1de5 + 63e7dfd commit b8955ee
Show file tree
Hide file tree
Showing 647 changed files with 110,738 additions and 701 deletions.
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ A log of changes by version and date.
======= ========== =====
Version Date Notes
======= ========== =====
1.41.0 09/21/2023 Added FlashBlade 2.11 client
1.40.0 09/18/2023 Expanded Pure1 1.1 client to support Pure1 invoices endpoint
1.39.0 09/06/2023 Added FlashArray 2.26 client
1.38.0 07/26/2023 Added FlashArray 2.25 client
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
author = u'Pure Storage, Inc.'

# The short X.Y version
version = u'1.40'
version = u'1.41'
# The full version, including alpha/beta/rc tags
release = u'1.40.0'
release = u'1.41.0'


# -- General configuration ---------------------------------------------------
Expand Down
39 changes: 28 additions & 11 deletions docs/fb_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ FlashBlade REST 2.10 Client
~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: pypureclient.flashblade.FB_2_10.client.Client

FlashBlade REST 2.11 Client
~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: pypureclient.flashblade.FB_2_11.client.Client
:members:


Expand Down Expand Up @@ -469,6 +474,18 @@ ClientPerformance
.. autoclass:: pypureclient.flashblade.ClientPerformance
:members:

ConnectionRelationshipPerformanceReplication
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: pypureclient.flashblade.ConnectionRelationshipPerformanceReplication
:members:

ConnectionRelationshipPerformanceReplicationGetResp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: pypureclient.flashblade.ConnectionRelationshipPerformanceReplicationGetResp
:members:

ContinuousReplicationPerformance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -1123,16 +1140,16 @@ Reference
.. autoclass:: pypureclient.flashblade.Reference
:members:

RelationshipPerformanceReplication
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ReferenceWritable
~~~~~~~~~~~~~~~~~

.. autoclass:: pypureclient.flashblade.RelationshipPerformanceReplication
.. autoclass:: pypureclient.flashblade.ReferenceWritable
:members:

RelationshipPerformanceReplicationGetResp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RelationshipPerformanceReplication
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. autoclass:: pypureclient.flashblade.RelationshipPerformanceReplicationGetResp
.. autoclass:: pypureclient.flashblade.RelationshipPerformanceReplication
:members:

ReplicaLinkBuiltIn
Expand Down Expand Up @@ -1831,7 +1848,7 @@ get_arrays_eula
patch_arrays_eula
'''''''''''''''''

.. literalinclude:: source/examples/FB2.0/patch_arrays_eula.py
.. literalinclude:: source/examples/FB2.11/patch_arrays_eula.py
:language: python

delete_arrays_factory_reset_token
Expand Down Expand Up @@ -2929,13 +2946,13 @@ get_smb_client_policies
patch_smb_client_policies
'''''''''''''''''''''''''

.. literalinclude:: source/examples/FB2.10/patch_smb_client_policies.py
.. literalinclude:: source/examples/FB2.11/patch_smb_client_policies.py
:language: python

post_smb_client_policies
''''''''''''''''''''''''

.. literalinclude:: source/examples/FB2.10/post_smb_client_policies.py
.. literalinclude:: source/examples/FB2.11/post_smb_client_policies.py
:language: python

delete_smb_client_policies_rules
Expand All @@ -2953,13 +2970,13 @@ get_smb_client_policies_rules
patch_smb_client_policies_rules
'''''''''''''''''''''''''''''''

.. literalinclude:: source/examples/FB2.10/patch_smb_client_policies_rules.py
.. literalinclude:: source/examples/FB2.11/patch_smb_client_policies_rules.py
:language: python

post_smb_client_policies_rules
''''''''''''''''''''''''''''''

.. literalinclude:: source/examples/FB2.10/post_smb_client_policies_rules.py
.. literalinclude:: source/examples/FB2.11/post_smb_client_policies_rules.py
:language: python

Policies Smb Share
Expand Down
26 changes: 26 additions & 0 deletions docs/source/examples/FB2.11/patch_arrays_eula.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from pypureclient.flashblade import Eula, EulaSignature

# Update the EULA with eula body parameter
# The fields 'name', 'title', 'company' are no longer required, but are still accepted and will be ignored.

signature = EulaSignature(name="example name", title="example", company="one company")
eula_body = Eula(signature=signature)
res = client.patch_arrays_eula(eula=eula_body)
print(res)
if type(res) == pypureclient.responses.ValidResponse:
print(list(res.items))

# Update the EULA with eula empty body parameter
# eula body with empty signature are still accepted, but will be ignored.
signature = EulaSignature()
eula_body = Eula(signature=signature)
res = client.patch_arrays_eula(eula=eula_body)
print(res)
if type(res) == pypureclient.responses.ValidResponse:
print(list(res.items))

# Update the EULA with no parameter
res = client.patch_arrays_eula()
print(res)
if type(res) == pypureclient.responses.ValidResponse:
print(list(res.items))
24 changes: 24 additions & 0 deletions docs/source/examples/FB2.11/patch_smb_client_policies.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from pypureclient.flashblade import SmbClientPolicy, SmbClientPolicyRule

# Bulk specify a new rule for the policy.
# Note: The rules must be ordered by client type grouped by
# IP addresses, (hostname, FQDN, netmasks), and asterisk (*).
bulk_rules = [
SmbClientPolicyRule(client='*', permission='ro', encryption='required')
]
policy_attr = SmbClientPolicy(rules=bulk_rules)
res = client.patch_smb_client_policies(names=["client_policy_1"], policy=policy_attr)
print(res)
if type(res) == pypureclient.responses.ValidResponse:
print(list(res.items))

# update the smb client policy with id '83efe671-3265-af1e-6dd2-c9ff155c2a18'
res = client.patch_smb_client_policies(ids=['83efe671-3265-af1e-6dd2-c9ff155c2a18'],
policy=policy_attr)
print(res)
if type(res) == pypureclient.responses.ValidResponse:
res_items = (list(res.items))
print(res_items)

# Other valid fields: ids
# See section "Common Fields" for examples
43 changes: 43 additions & 0 deletions docs/source/examples/FB2.11/patch_smb_client_policies_rules.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
from pypureclient.flashblade import SmbClientPolicyRule

policyname = 'client_policy_1'

# Patch client policy rule 'client_policy_1.1' in client policy named 'client_policy_1'
res = client.patch_smb_client_policies_rules(names=[policyname+'.1'],
rule=SmbClientPolicyRule(permission='ro', encryption='required'))

print(res)
if type(res) == pypureclient.responses.ValidResponse:
print(list(res.items))

# Patch a policy by name with a version specifier.
# The Patch will fail if the policy version differs from specified version.
policy_version = '00000000-7b11-a468-0000-0000503669ea'
res = client.patch_smb_client_policies_rules(names=[policyname+'.1'],
rule=SmbClientPolicyRule(permission='ro', encryption='required'),
versions=[policy_version])

print(res)
if type(res) == pypureclient.responses.ValidResponse:
print(list(res.items))

# Insert or Move a rule client_policy_1.1 rule before 'client_policy_1.2` in client policy named 'client_policy_1'
res = client.patch_smb_client_policies_rules(names=[policyname+'.1'],
before_rule_name=[policyname+'.2'],
rule=SmbClientPolicyRule(permission='ro', encryption='required'))

print(res)
if type(res) == pypureclient.responses.ValidResponse:
print(list(res.items))

# Insert or Move a rule 'client_policy_1.1` before rule id `10314f42-020d-7080-8013-000ddt400012` in client policy named 'client_policy_1'
res = client.patch_smb_client_policies_rules(names=[policyname+'.1'],
before_rule_id=["10314f42-020d-7080-8013-000ddt400012"],
rule=SmbClientPolicyRule(permission='ro', encryption='required'))

print(res)
if type(res) == pypureclient.responses.ValidResponse:
print(list(res.items))

# Other valid fields: ids
# See section "Common Fields" for examples
12 changes: 12 additions & 0 deletions docs/source/examples/FB2.11/post_smb_client_policies.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from pypureclient.flashblade import SmbClientPolicy, SmbClientPolicyRule

# Create a client policy with a rule which allows Read (but no other) permissions and
# requires encryption for everyone.
policyname = 'client_policy_1'
policy = SmbClientPolicy()
policy.rules = [SmbClientPolicyRule(client='*', permission='ro', encryption='required')]

res = client.post_smb_client_policies(names=[policyname], policy=policy)
print(res)
if type(res) == pypureclient.responses.ValidResponse:
print(list(res.items))
32 changes: 32 additions & 0 deletions docs/source/examples/FB2.11/post_smb_client_policies_rules.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
from pypureclient.flashblade import SmbClientPolicyRule

policyname = 'client_policy_1'

# Create a new client policy rule in the client policy named 'client_policy_1'
# with specified client, permission, and encryption
res = client.post_smb_client_policies_rules(policy_names=[policyname],
rule=SmbClientPolicyRule(client='*', permission='ro', encryption='required'))

# Insert or Move a policy by name with a version specifier.
# The Post will fail if the policy version differs from specified version.
policy_version = '00000000-7b11-a468-0000-0000503669ea'
res = client.post_smb_client_policies_rules(policy_names=[policyname],
rule=SmbClientPolicyRule(client='*', permission='ro', encryption='required'),
versions=[policy_version])

# Insert or Move a rule client_policy_1.1 rule before 'client_policy_1.2` in client policy named 'client_policy_1'
res = client.post_smb_client_policies_rules(before_rule_name=[policyname+'.2'],
policy_names=[policyname],
rule=SmbClientPolicyRule(client='*', permission='ro', encryption='required'))

# Insert or Move a rule 'client_policy_1.1` before rule id `10314f42-020d-7080-8013-000ddt400012` in client policy named 'client_policy_1'
res = client.post_smb_client_policies_rules(before_rule_id=["10314f42-020d-7080-8013-000ddt400012"],
policy_names=[policyname],
rule=SmbClientPolicyRule(client='*', permission='ro', encryption='required'))

print(res)
if type(res) == pypureclient.responses.ValidResponse:
print(list(res.items))

# Other valid fields: policy_ids
# See section "Common Fields" for examples
28 changes: 22 additions & 6 deletions docs/source/pypureclient.flashblade.FB_2_0.models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,22 @@ pypureclient.flashblade.FB\_2\_0.models.client\_performance\_get\_response modul
:undoc-members:
:show-inheritance:

pypureclient.flashblade.FB\_2\_0.models.connection\_relationship\_performance\_replication module
-------------------------------------------------------------------------------------------------

.. automodule:: pypureclient.flashblade.FB_2_0.models.connection_relationship_performance_replication
:members:
:undoc-members:
:show-inheritance:

pypureclient.flashblade.FB\_2\_0.models.connection\_relationship\_performance\_replication\_get\_resp module
------------------------------------------------------------------------------------------------------------

.. automodule:: pypureclient.flashblade.FB_2_0.models.connection_relationship_performance_replication_get_resp
:members:
:undoc-members:
:show-inheritance:

pypureclient.flashblade.FB\_2\_0.models.direction module
--------------------------------------------------------

Expand Down Expand Up @@ -1740,18 +1756,18 @@ pypureclient.flashblade.FB\_2\_0.models.reference module
:undoc-members:
:show-inheritance:

pypureclient.flashblade.FB\_2\_0.models.relationship\_performance\_replication module
-------------------------------------------------------------------------------------
pypureclient.flashblade.FB\_2\_0.models.reference\_writable module
------------------------------------------------------------------

.. automodule:: pypureclient.flashblade.FB_2_0.models.relationship_performance_replication
.. automodule:: pypureclient.flashblade.FB_2_0.models.reference_writable
:members:
:undoc-members:
:show-inheritance:

pypureclient.flashblade.FB\_2\_0.models.relationship\_performance\_replication\_get\_resp module
------------------------------------------------------------------------------------------------
pypureclient.flashblade.FB\_2\_0.models.relationship\_performance\_replication module
-------------------------------------------------------------------------------------

.. automodule:: pypureclient.flashblade.FB_2_0.models.relationship_performance_replication_get_resp
.. automodule:: pypureclient.flashblade.FB_2_0.models.relationship_performance_replication
:members:
:undoc-members:
:show-inheritance:
Expand Down
28 changes: 22 additions & 6 deletions docs/source/pypureclient.flashblade.FB_2_1.models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,22 @@ pypureclient.flashblade.FB\_2\_1.models.client\_performance\_get\_response modul
:undoc-members:
:show-inheritance:

pypureclient.flashblade.FB\_2\_1.models.connection\_relationship\_performance\_replication module
-------------------------------------------------------------------------------------------------

.. automodule:: pypureclient.flashblade.FB_2_1.models.connection_relationship_performance_replication
:members:
:undoc-members:
:show-inheritance:

pypureclient.flashblade.FB\_2\_1.models.connection\_relationship\_performance\_replication\_get\_resp module
------------------------------------------------------------------------------------------------------------

.. automodule:: pypureclient.flashblade.FB_2_1.models.connection_relationship_performance_replication_get_resp
:members:
:undoc-members:
:show-inheritance:

pypureclient.flashblade.FB\_2\_1.models.direction module
--------------------------------------------------------

Expand Down Expand Up @@ -1804,18 +1820,18 @@ pypureclient.flashblade.FB\_2\_1.models.reference module
:undoc-members:
:show-inheritance:

pypureclient.flashblade.FB\_2\_1.models.relationship\_performance\_replication module
-------------------------------------------------------------------------------------
pypureclient.flashblade.FB\_2\_1.models.reference\_writable module
------------------------------------------------------------------

.. automodule:: pypureclient.flashblade.FB_2_1.models.relationship_performance_replication
.. automodule:: pypureclient.flashblade.FB_2_1.models.reference_writable
:members:
:undoc-members:
:show-inheritance:

pypureclient.flashblade.FB\_2\_1.models.relationship\_performance\_replication\_get\_resp module
------------------------------------------------------------------------------------------------
pypureclient.flashblade.FB\_2\_1.models.relationship\_performance\_replication module
-------------------------------------------------------------------------------------

.. automodule:: pypureclient.flashblade.FB_2_1.models.relationship_performance_replication_get_resp
.. automodule:: pypureclient.flashblade.FB_2_1.models.relationship_performance_replication
:members:
:undoc-members:
:show-inheritance:
Expand Down
Loading

0 comments on commit b8955ee

Please sign in to comment.