Skip to content

Commit f40dafb

Browse files
author
Tiberiu Vilcu
committed
Release 1.9.0: Added support for Pure1 directories
1 parent aeb1327 commit f40dafb

34 files changed

+1128
-156
lines changed

docs/changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ A log of changes by version and date.
66
======= ========== =====
77
Version Date Notes
88
======= ========== =====
9+
1.9.0 10/22/2020 Added support for Pure1 directories endpoint
910
1.8.0 09/22/2020 Added FlashArray 2.3 client
1011
1.7.0 08/06/2020 Added Pure1 1.1 client and support for Pure1 drives, hardware, ports, and hardware-connectors endpoints
1112
1.6.0 06/26/2020 Added FlashArray 2.2 client

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
author = u'Pure Storage, Inc.'
2828

2929
# The short X.Y version
30-
version = u'1.1'
30+
version = u'1.9'
3131
# The full version, including alpha/beta/rc tags
32-
release = u'1.8.0'
32+
release = u'1.9.0'
3333

3434

3535
# -- General configuration ---------------------------------------------------

docs/source/pypureclient.pure1.Pure1_1_0.api.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ pypureclient.pure1.Pure1\_1\_0.api.controllers\_api module
6868
:undoc-members:
6969
:show-inheritance:
7070

71+
pypureclient.pure1.Pure1\_1\_0.api.directories\_api module
72+
----------------------------------------------------------
73+
74+
.. automodule:: pypureclient.pure1.Pure1_1_0.api.directories_api
75+
:members:
76+
:undoc-members:
77+
:show-inheritance:
78+
7179
pypureclient.pure1.Pure1\_1\_0.api.drives\_api module
7280
-----------------------------------------------------
7381

docs/source/pypureclient.pure1.Pure1_1_0.models.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,30 @@ pypureclient.pure1.Pure1\_1\_0.models.controller\_response module
212212
:undoc-members:
213213
:show-inheritance:
214214

215+
pypureclient.pure1.Pure1\_1\_0.models.directory module
216+
------------------------------------------------------
217+
218+
.. automodule:: pypureclient.pure1.Pure1_1_0.models.directory
219+
:members:
220+
:undoc-members:
221+
:show-inheritance:
222+
223+
pypureclient.pure1.Pure1\_1\_0.models.directory\_get\_response module
224+
---------------------------------------------------------------------
225+
226+
.. automodule:: pypureclient.pure1.Pure1_1_0.models.directory_get_response
227+
:members:
228+
:undoc-members:
229+
:show-inheritance:
230+
231+
pypureclient.pure1.Pure1\_1\_0.models.directory\_response module
232+
----------------------------------------------------------------
233+
234+
.. automodule:: pypureclient.pure1.Pure1_1_0.models.directory_response
235+
:members:
236+
:undoc-members:
237+
:show-inheritance:
238+
215239
pypureclient.pure1.Pure1\_1\_0.models.drive module
216240
--------------------------------------------------
217241

docs/source/pypureclient.pure1.Pure1_1_1.api.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ pypureclient.pure1.Pure1\_1\_1.api.controllers\_api module
6868
:undoc-members:
6969
:show-inheritance:
7070

71+
pypureclient.pure1.Pure1\_1\_1.api.directories\_api module
72+
----------------------------------------------------------
73+
74+
.. automodule:: pypureclient.pure1.Pure1_1_1.api.directories_api
75+
:members:
76+
:undoc-members:
77+
:show-inheritance:
78+
7179
pypureclient.pure1.Pure1\_1\_1.api.drives\_api module
7280
-----------------------------------------------------
7381

docs/source/pypureclient.pure1.Pure1_1_1.models.rst

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,6 @@ pypureclient.pure1.Pure1\_1\_1.models.arrays module
6060
:undoc-members:
6161
:show-inheritance:
6262

63-
pypureclient.pure1.Pure1\_1\_1.models.arrays2 module
64-
----------------------------------------------------
65-
66-
.. automodule:: pypureclient.pure1.Pure1_1_1.models.arrays2
67-
:members:
68-
:undoc-members:
69-
:show-inheritance:
70-
71-
pypureclient.pure1.Pure1\_1\_1.models.arrays\_built\_in module
72-
--------------------------------------------------------------
73-
74-
.. automodule:: pypureclient.pure1.Pure1_1_1.models.arrays_built_in
75-
:members:
76-
:undoc-members:
77-
:show-inheritance:
78-
7963
pypureclient.pure1.Pure1\_1\_1.models.arrays\_resource module
8064
-------------------------------------------------------------
8165

@@ -220,6 +204,30 @@ pypureclient.pure1.Pure1\_1\_1.models.controller\_response module
220204
:undoc-members:
221205
:show-inheritance:
222206

207+
pypureclient.pure1.Pure1\_1\_1.models.directory module
208+
------------------------------------------------------
209+
210+
.. automodule:: pypureclient.pure1.Pure1_1_1.models.directory
211+
:members:
212+
:undoc-members:
213+
:show-inheritance:
214+
215+
pypureclient.pure1.Pure1\_1\_1.models.directory\_get\_response module
216+
---------------------------------------------------------------------
217+
218+
.. automodule:: pypureclient.pure1.Pure1_1_1.models.directory_get_response
219+
:members:
220+
:undoc-members:
221+
:show-inheritance:
222+
223+
pypureclient.pure1.Pure1\_1\_1.models.directory\_response module
224+
----------------------------------------------------------------
225+
226+
.. automodule:: pypureclient.pure1.Pure1_1_1.models.directory_response
227+
:members:
228+
:undoc-members:
229+
:show-inheritance:
230+
223231
pypureclient.pure1.Pure1\_1\_1.models.drive module
224232
--------------------------------------------------
225233

@@ -356,14 +364,6 @@ pypureclient.pure1.Pure1\_1\_1.models.fixed\_reference module
356364
:undoc-members:
357365
:show-inheritance:
358366

359-
pypureclient.pure1.Pure1\_1\_1.models.fixed\_reference2 module
360-
--------------------------------------------------------------
361-
362-
.. automodule:: pypureclient.pure1.Pure1_1_1.models.fixed_reference2
363-
:members:
364-
:undoc-members:
365-
:show-inheritance:
366-
367367
pypureclient.pure1.Pure1\_1\_1.models.fixed\_reference\_fqdn module
368368
-------------------------------------------------------------------
369369

docs/source/pypureclient.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Subpackages
77
.. toctree::
88

99
pypureclient.flasharray
10+
pypureclient.mordac
1011
pypureclient.pure1
1112

1213
Submodules

pypureclient/pure1/Pure1_1_0/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from .models.bucket import Bucket
1515
from .models.bucket_replica_link import BucketReplicaLink
1616
from .models.controller import Controller
17+
from .models.directory import Directory
1718
from .models.drive import Drive
1819
from .models.drive_array_status import DriveArrayStatus
1920
from .models.error import Error
@@ -67,6 +68,7 @@ def add_properties(model):
6768
Bucket,
6869
BucketReplicaLink,
6970
Controller,
71+
Directory,
7072
Drive,
7173
DriveArrayStatus,
7274
Error,

pypureclient/pure1/Pure1_1_0/api/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from .bucket_replica_links_api import BucketReplicaLinksApi
1010
from .buckets_api import BucketsApi
1111
from .controllers_api import ControllersApi
12+
from .directories_api import DirectoriesApi
1213
from .drives_api import DrivesApi
1314
from .file_system_replica_links_api import FileSystemReplicaLinksApi
1415
from .file_system_snapshots_api import FileSystemSnapshotsApi
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
# coding: utf-8
2+
3+
"""
4+
Pure1 Public REST API
5+
6+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
7+
8+
OpenAPI spec version: 1.0
9+
10+
Generated by: https://github.com/swagger-api/swagger-codegen.git
11+
"""
12+
13+
14+
from __future__ import absolute_import
15+
16+
import re
17+
18+
# python 2 and python 3 compatibility library
19+
import six
20+
from typing import List, Optional
21+
22+
from .. import models
23+
24+
class DirectoriesApi(object):
25+
26+
def __init__(self, api_client):
27+
self.api_client = api_client
28+
29+
def api10_directories_get_with_http_info(
30+
self,
31+
authorization=None, # type: str
32+
x_request_id=None, # type: str
33+
continuation_token=None, # type: str
34+
file_system_ids=None, # type: List[str]
35+
file_system_names=None, # type: List[str]
36+
filter=None, # type: str
37+
ids=None, # type: List[str]
38+
limit=None, # type: int
39+
names=None, # type: List[str]
40+
offset=None, # type: int
41+
sort=None, # type: List[str]
42+
async_req=False, # type: bool
43+
_return_http_data_only=False, # type: bool
44+
_preload_content=True, # type: bool
45+
_request_timeout=None, # type: Optional[int]
46+
):
47+
# type: (...) -> models.DirectoryGetResponse
48+
"""Get managed directories
49+
50+
Retrieves information about FlashArray managed directory objects.
51+
This method makes a synchronous HTTP request by default. To make an
52+
asynchronous HTTP request, please pass async_req=True
53+
>>> thread = api.api10_directories_get_with_http_info(async_req=True)
54+
>>> result = thread.get()
55+
56+
:param str authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`)
57+
:param str x_request_id: Supplied by client during request or generated by server.
58+
:param str continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. Single quotes are required around all strings.
59+
:param list[str] file_system_ids: Performs the operation on the file system ID specified. Enter multiple file system IDs in comma-separated format. The `file_system_ids` and `file_system_names` parameters cannot be provided together. Single quotes are required around all strings.
60+
:param list[str] file_system_names: Performs the operation on the file system name specified. Enter multiple file system names in comma-separated format. For example, `filesystem1,filesystem2`. The `file_system_ids` and `file_system_names` parameters cannot be provided together. Single quotes are required around all strings.
61+
:param str filter: Exclude resources that don't match the specified criteria. Single quotes are required around all strings inside the filters.
62+
:param list[str] ids: A comma-separated list of resource IDs. If there is not at least one resource that matches each `id` element, an error is returned. Single quotes are required around all strings.
63+
:param int limit: Limit the size of the response to the specified number of resources. A limit of 0 can be used to get the number of resources without getting all of the resources. It will be returned in the total_item_count field. If a client asks for a page size larger than the maximum number, the request is still valid. In that case the server just returns the maximum number of items, disregarding the client's page size request. If not specified, defaults to 1000.
64+
:param list[str] names: A comma-separated list of resource names. If there is not at least one resource that matches each `name` element, an error is returned. Single quotes are required around all strings.
65+
:param int offset: The offset of the first resource to return from a collection.
66+
:param list[str] sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). If you provide a sort you will not get a continuation token in the response.
67+
:param bool async_req: Request runs in separate thread and method returns multiprocessing.pool.ApplyResult.
68+
:param bool _return_http_data_only: Returns only data field.
69+
:param bool _preload_content: Response is converted into objects.
70+
:param int _request_timeout: Total request timeout in seconds.
71+
It can also be a tuple of (connection time, read time) timeouts.
72+
:return: DirectoryGetResponse
73+
If the method is called asynchronously,
74+
returns the request thread.
75+
"""
76+
continuation_token = models.quoteString(continuation_token)
77+
if file_system_ids is not None:
78+
if not isinstance(file_system_ids, list):
79+
file_system_ids = [file_system_ids]
80+
if file_system_names is not None:
81+
if not isinstance(file_system_names, list):
82+
file_system_names = [file_system_names]
83+
if ids is not None:
84+
if not isinstance(ids, list):
85+
ids = [ids]
86+
ids = models.quoteStrings(ids)
87+
if names is not None:
88+
if not isinstance(names, list):
89+
names = [names]
90+
names = models.quoteStrings(names)
91+
if sort is not None:
92+
if not isinstance(sort, list):
93+
sort = [sort]
94+
params = {k: v for k, v in six.iteritems(locals()) if v is not None}
95+
96+
# Convert the filter into a string
97+
if params.get('filter'):
98+
params['filter'] = str(params['filter'])
99+
if params.get('sort'):
100+
params['sort'] = [str(_x) for _x in params['sort']]
101+
102+
if 'offset' in params and params['offset'] < 0:
103+
raise ValueError("Invalid value for parameter `offset` when calling `api10_directories_get`, must be a value greater than or equal to `0`")
104+
collection_formats = {}
105+
path_params = {}
106+
107+
query_params = []
108+
if 'continuation_token' in params:
109+
query_params.append(('continuation_token', params['continuation_token']))
110+
if 'file_system_ids' in params:
111+
query_params.append(('file_system_ids', params['file_system_ids']))
112+
collection_formats['file_system_ids'] = 'csv'
113+
if 'file_system_names' in params:
114+
query_params.append(('file_system_names', params['file_system_names']))
115+
collection_formats['file_system_names'] = 'csv'
116+
if 'filter' in params:
117+
query_params.append(('filter', params['filter']))
118+
if 'ids' in params:
119+
query_params.append(('ids', params['ids']))
120+
collection_formats['ids'] = 'csv'
121+
if 'limit' in params:
122+
query_params.append(('limit', params['limit']))
123+
if 'names' in params:
124+
query_params.append(('names', params['names']))
125+
collection_formats['names'] = 'csv'
126+
if 'offset' in params:
127+
query_params.append(('offset', params['offset']))
128+
if 'sort' in params:
129+
query_params.append(('sort', params['sort']))
130+
collection_formats['sort'] = 'csv'
131+
132+
header_params = {}
133+
if 'authorization' in params:
134+
header_params['Authorization'] = params['authorization']
135+
if 'x_request_id' in params:
136+
header_params['X-Request-ID'] = params['x_request_id']
137+
138+
form_params = []
139+
local_var_files = {}
140+
141+
body_params = None
142+
# HTTP header `Accept`
143+
header_params['Accept'] = self.api_client.select_header_accept(
144+
['application/json'])
145+
146+
# HTTP header `Content-Type`
147+
header_params['Content-Type'] = self.api_client.select_header_content_type(
148+
['application/json'])
149+
150+
# Authentication setting
151+
auth_settings = ['AuthorizationHeader']
152+
153+
return self.api_client.call_api(
154+
'/api/1.0/directories', 'GET',
155+
path_params,
156+
query_params,
157+
header_params,
158+
body=body_params,
159+
post_params=form_params,
160+
files=local_var_files,
161+
response_type='DirectoryGetResponse',
162+
auth_settings=auth_settings,
163+
async_req=async_req,
164+
_return_http_data_only=_return_http_data_only,
165+
_preload_content=_preload_content,
166+
_request_timeout=_request_timeout,
167+
collection_formats=collection_formats,
168+
)

0 commit comments

Comments
 (0)