Skip to content

Commit 612c17d

Browse files
authored
Release 1.67.0 Added REST Pure1-1.5 (#169)
1 parent f4a850a commit 612c17d

File tree

32,730 files changed

+7557038
-7026353
lines changed

Some content is hidden

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

32,730 files changed

+7557038
-7026353
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ For the current FlashArray REST 1.x Python SDK, [see here](https://github.com/Pu
1010

1111
## Requirements
1212

13-
The library requires Python 3.5 or higher. Third-party libraries are also required.
13+
The library requires Python 3.8 or higher. Third-party libraries are also required.
1414

1515
## Installation
1616

@@ -29,4 +29,4 @@ $ python setup.py install
2929

3030
## Documentation
3131

32-
For full documentation, including a quick start guide and examples, see https://pure-storage-py-pure-client.readthedocs-hosted.com/en/latest/index.html.
32+
For full documentation, including a quick start guide and examples, see https://code.purestorage.com/py-pure-client

pyproject.toml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,40 @@
11
[project]
22
name = "py-pure-client"
3-
version = "1.66.0"
3+
version = "1.67.0"
44
description = "Pure Storage Python clients for FlashArray, FlashBlade, and Pure1 APIs"
55
authors = [
66
{ name = "Pure Storage", email = "support@purestorage.com" }
77
]
88
readme = "README.md"
99
license = {file = "LICENSE.txt"}
10-
requires-python = ">=3.5"
10+
requires-python = ">=3.8"
1111
keywords = ['Swagger', 'Pure Storage', 'Python', 'clients', 'REST', 'API', 'FlashArray', 'FlashBlade', 'Pure1']
1212
classifiers = [
1313
"Topic :: Software Development :: Libraries",
1414
"Operating System :: OS Independent"
1515
]
1616
dependencies = [
1717
'certifi >= 2024.07.04',
18-
'six >=1.10',
19-
'python_dateutil >=2.5.3',
18+
'python_dateutil >=2.8.2',
2019
'setuptools >=70.0.0',
2120
'urllib3 >= 1.26.17',
2221
'paramiko >= 3.4.0',
2322
'pyjwt >=2.0.0',
2423
'requests >= 2.32.0',
25-
'typing >=3.7.4.1; python_version < "3.5"',
24+
'pydantic >= 1.10.5, < 2',
25+
'aenum == 3.1.15'
2626
]
2727

2828
[project.urls]
2929
"GitHub" = "https://github.com/PureStorage-OpenConnect/py-pure-client"
30-
"Documentation" = "https://pure-storage-py-pure-client.readthedocs-hosted.com/en/latest/quick_start.html"
30+
"Documentation" = "https://code.purestorage.com/py-pure-client/"
3131

3232
[build-system]
3333
requires = ["setuptools"]
3434
build-backend = "setuptools.build_meta"
3535

36+
[tool.pylint.'MESSAGES CONTROL']
37+
extension-pkg-whitelist = "pydantic"
38+
39+
[tool.mypy]
40+
packages = ["pypureclient"]

pypureclient/__init__.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
1-
from . import flasharray
2-
from . import flashblade
3-
from . import pure1
1+
class __LazyLoader:
2+
'thin shell class to wrap modules. load real module on first access and pass thru'
3+
4+
def __init__ (self, modname) :
5+
self._modname = modname
6+
self._mod = None
7+
8+
def __getattr__ (self, attr) :
9+
'import module on first attribute access'
10+
import importlib
11+
if self._mod is None :
12+
self._mod = importlib.import_module(self._modname)
13+
return getattr(self._mod, attr)
14+
15+
flasharray = __LazyLoader("pypureclient.flasharray")
16+
flashblade = __LazyLoader("pypureclient.flashblade")
17+
pure1 = __LazyLoader("pypureclient.pure1")
418

519
from .exceptions import PureError
620
from .properties import Property, Filter

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.66.0'
2+
__version__ = '1.67.0'
33
__default_user_agent__ = 'pure/{}/{}'.format(__name__, __version__)
Lines changed: 9 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,14 @@
1-
from __future__ import absolute_import
2-
import os
1+
# coding: utf-8
2+
"""
3+
FlashArray REST API
34
4-
from .client import Client
5-
from ...exceptions import PureError
6-
from ...properties import Property, Filter
7-
from ...responses import ValidResponse, ErrorResponse, ApiError, ResponseHeaders
5+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
86
9-
from .models.built_in import BuiltIn
10-
from .models.chap import Chap
11-
from .models.connection import Connection
12-
from .models.connection_post import ConnectionPost
13-
from .models.destroyed_patch_post import DestroyedPatchPost
14-
from .models.fixed_reference import FixedReference
15-
from .models.fixed_reference_no_id import FixedReferenceNoId
16-
from .models.host_port_connectivity import HostPortConnectivity
17-
from .models.host_post import HostPost
18-
from .models.member import Member
19-
from .models.member_no_id_all import MemberNoIdAll
20-
from .models.new_name import NewName
21-
from .models.page_info import PageInfo
22-
from .models.performance import Performance
23-
from .models.qos import Qos
24-
from .models.reference import Reference
25-
from .models.reference_no_id import ReferenceNoId
26-
from .models.resource import Resource
27-
from .models.resource_no_id import ResourceNoId
28-
from .models.snapshot import Snapshot
29-
from .models.space import Space
30-
from .models.transfer import Transfer
31-
from .models.username import Username
32-
from .models.host import Host
33-
from .models.host_group import HostGroup
34-
from .models.host_group_patch import HostGroupPatch
35-
from .models.host_patch import HostPatch
36-
from .models.resource_performance import ResourcePerformance
37-
from .models.resource_performance_no_id import ResourcePerformanceNoId
38-
from .models.resource_space import ResourceSpace
39-
from .models.volume_common import VolumeCommon
40-
from .models.volume_patch import VolumePatch
41-
from .models.volume_performance import VolumePerformance
42-
from .models.volume_post import VolumePost
43-
from .models.volume_snapshot import VolumeSnapshot
44-
from .models.volume_snapshot_patch import VolumeSnapshotPatch
45-
from .models.volume_snapshot_post import VolumeSnapshotPost
46-
from .models.volume_snapshot_transfer import VolumeSnapshotTransfer
47-
from .models.resource_performance_by_array import ResourcePerformanceByArray
48-
from .models.resource_performance_no_id_by_array import ResourcePerformanceNoIdByArray
49-
from .models.volume import Volume
7+
The version of the OpenAPI document: 2.0
8+
Generated by OpenAPI Generator (https://openapi-generator.tech)
509
10+
Do not edit the class manually.
11+
""" # noqa: E501
5112

52-
def add_properties(model):
53-
for name, value in model.attribute_map.items():
54-
setattr(model, name, Property(value))
5513

56-
57-
def add_all_properties():
58-
for model in CLASSES_TO_ADD_PROPS:
59-
add_properties(model)
60-
61-
62-
CLASSES_TO_ADD_PROPS = [
63-
BuiltIn,
64-
Chap,
65-
Connection,
66-
ConnectionPost,
67-
DestroyedPatchPost,
68-
FixedReference,
69-
FixedReferenceNoId,
70-
HostPortConnectivity,
71-
HostPost,
72-
Member,
73-
MemberNoIdAll,
74-
NewName,
75-
PageInfo,
76-
Performance,
77-
Qos,
78-
Reference,
79-
ReferenceNoId,
80-
Resource,
81-
ResourceNoId,
82-
Snapshot,
83-
Space,
84-
Transfer,
85-
Username,
86-
Host,
87-
HostGroup,
88-
HostGroupPatch,
89-
HostPatch,
90-
ResourcePerformance,
91-
ResourcePerformanceNoId,
92-
ResourceSpace,
93-
VolumeCommon,
94-
VolumePatch,
95-
VolumePerformance,
96-
VolumePost,
97-
VolumeSnapshot,
98-
VolumeSnapshotPatch,
99-
VolumeSnapshotPost,
100-
VolumeSnapshotTransfer,
101-
ResourcePerformanceByArray,
102-
ResourcePerformanceNoIdByArray,
103-
Volume
104-
]
105-
106-
if os.environ.get('DOCS_GENERATION') is None:
107-
add_all_properties()
14+
from .client import Client
Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,39 @@
1-
from __future__ import absolute_import
1+
"""
2+
FlashArray REST API
23
3-
# import apis into api package
4-
from .authorization_api import AuthorizationApi
5-
from .connections_api import ConnectionsApi
6-
from .host_groups_api import HostGroupsApi
7-
from .hosts_api import HostsApi
8-
from .volume_snapshots_api import VolumeSnapshotsApi
9-
from .volumes_api import VolumesApi
4+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
105
6+
The version of the OpenAPI document: 2.0
7+
Generated by OpenAPI Generator (https://openapi-generator.tech)
8+
9+
Do not edit the class manually.
10+
""" # noqa: E501
11+
12+
13+
class __LazyApiLoader:
14+
def __init__(self, modname, attr):
15+
self._modname = modname
16+
self._attr = attr
17+
self._mod = None
18+
19+
def load(self):
20+
import importlib
21+
if self._mod is None:
22+
self._mod = importlib.__import__(self._modname, globals(), locals(), fromlist=[self._attr], level=1)
23+
return getattr(self._mod, self._attr)
24+
25+
__class_apis_dict = {
26+
'AuthorizationApi': __LazyApiLoader('authorization_api', 'AuthorizationApi'),
27+
'ConnectionsApi': __LazyApiLoader('connections_api', 'ConnectionsApi'),
28+
'HostGroupsApi': __LazyApiLoader('host_groups_api', 'HostGroupsApi'),
29+
'HostsApi': __LazyApiLoader('hosts_api', 'HostsApi'),
30+
'VolumeSnapshotsApi': __LazyApiLoader('volume_snapshots_api', 'VolumeSnapshotsApi'),
31+
'VolumesApi': __LazyApiLoader('volumes_api', 'VolumesApi'),
32+
}
33+
34+
def __getattr__(name, default=None):
35+
if '_apis_list' == name:
36+
return __class_apis_dict.keys()
37+
if name not in __class_apis_dict:
38+
raise AttributeError(f'module {__name__} has no attribute {name}')
39+
return __class_apis_dict[name].load()

0 commit comments

Comments
 (0)