PyU4V 10.2.0.0__tar.gz → 10.2.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. PyU4V-10.2.0.1/PKG-INFO +284 -0
  2. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/__init__.py +2 -1
  3. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/metro_dr.py +8 -2
  4. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/performance.py +4 -1
  5. PyU4V-10.2.0.1/PyU4V/scripts/__init__.py +0 -0
  6. PyU4V-10.2.0.1/PyU4V/scripts/replace_version.py +47 -0
  7. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/system.py +6 -3
  8. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/univmax_conn.py +6 -5
  9. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/utils/constants.py +5 -3
  10. PyU4V-10.2.0.1/PyU4V.egg-info/PKG-INFO +284 -0
  11. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V.egg-info/SOURCES.txt +2 -1
  12. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/README.rst +7 -6
  13. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/setup.py +1 -1
  14. PyU4V-10.2.0.0/LICENSE +0 -174
  15. PyU4V-10.2.0.0/PKG-INFO +0 -286
  16. PyU4V-10.2.0.0/PyU4V.egg-info/PKG-INFO +0 -286
  17. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/clone.py +0 -0
  18. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/common.py +0 -0
  19. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/migration.py +0 -0
  20. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/performance_enhanced.py +0 -0
  21. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/provisioning.py +0 -0
  22. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/real_time.py +0 -0
  23. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/replication.py +0 -0
  24. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/rest_requests.py +0 -0
  25. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/serviceability.py +0 -0
  26. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/snapshot_policy.py +0 -0
  27. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/storage_groups.py +0 -0
  28. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/tools/__init__.py +0 -0
  29. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/tools/generate_functions.py +0 -0
  30. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/tools/openstack/__init__.py +0 -0
  31. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/tools/openstack/migrate.py +0 -0
  32. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/tools/openstack/migrate_utils.py +0 -0
  33. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/utils/__init__.py +0 -0
  34. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/utils/config_handler.py +0 -0
  35. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/utils/console.py +0 -0
  36. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/utils/decorators.py +0 -0
  37. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/utils/exception.py +0 -0
  38. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/utils/file_handler.py +0 -0
  39. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/utils/performance_category_map.py +0 -0
  40. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/utils/performance_constants.py +0 -0
  41. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/utils/time_handler.py +0 -0
  42. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/utils/utils.py +0 -0
  43. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/volumes.py +0 -0
  44. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V/workload_planner.py +0 -0
  45. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V.egg-info/dependency_links.txt +0 -0
  46. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V.egg-info/requires.txt +1 -1
  47. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/PyU4V.egg-info/top_level.txt +0 -0
  48. {PyU4V-10.2.0.0 → PyU4V-10.2.0.1}/setup.cfg +0 -0
@@ -0,0 +1,284 @@
1
+ Metadata-Version: 2.1
2
+ Name: PyU4V
3
+ Version: 10.2.0.1
4
+ Summary: A Python library for use with Dell EMC's Unisphere for PowerMax REST API.
5
+ Home-page: https://github.com/dell/PyU4V/
6
+ Author: Dell Inc. or its subsidiaries
7
+ Author-email: paule.martin@dell.com
8
+ License: Apache 2.0
9
+ Description: Welcome to PyU4V 10.2
10
+ =====================
11
+
12
+ | |Maintenance| |OpenSource| |AskUs| |License| |Test| |Build| |Docs|
13
+ | |Language| |PyVersions| |Unisphere| |Platform| |DTotal| |DMonth| |DWeek|
14
+
15
+ Overview
16
+ --------
17
+
18
+ PyU4V is a Python module that simplifies interaction with the Unisphere for
19
+ PowerMax REST API. It wraps REST calls with simple APIs that abstract the HTTP
20
+ request and response handling.
21
+
22
+ Full documentation and user guides can be found in PyU4V's ReadTheDocs_.
23
+
24
+ Note
25
+ You can get the Unisphere for PowerMax REST documentation by
26
+ navigating to a URL in your local instance of Unisphere for PowerMax.
27
+ Navigate to ``https://{ip-address}:{port}/univmax/restapi/docs``
28
+ where ``{ip-address}`` is the IP address of your Unisphere server and
29
+ ``{port}`` is the port it is listening on.
30
+
31
+ PyU4V Version 10.2
32
+ ------------------
33
+
34
+ +-------------------------------+----------------------------+
35
+ | **Author** | Dell EMC |
36
+ +-------------------------------+----------------------------+
37
+ | **PyU4V Version** | 10.2.0.1 |
38
+ +-------------------------------+----------------------------+
39
+ | **Minimum Unisphere Version** | 10.2.0 |
40
+ +-------------------------------+----------------------------+
41
+ | **Array Model** | VMAX-3, VMAX AFA, PowerMax |
42
+ +-------------------------------+----------------------------+
43
+ | **Array uCode** | HyperMax OS, PowerMax OS |
44
+ +-------------------------------+----------------------------+
45
+ | **Platforms** | Linux, Windows |
46
+ +-------------------------------+----------------------------+
47
+ | **Python** | 3.6, 3.7, 3.8, 3.9 |
48
+ +-------------------------------+----------------------------+
49
+ | **Requires** | Requests_, Six_, urllib3_ |
50
+ +-------------------------------+----------------------------+
51
+
52
+ Note
53
+ If you want to continue to use Unisphere 8.4.x or 9.0.x with PyU4V you will
54
+ need to remain on PyU4V 3.1.x. There is no support for PyU4V 9.x with any
55
+ version of Unisphere older than 9.1.x
56
+
57
+ Note
58
+ PyU4V version 10.2 is compatible with scripts written for PyU4V
59
+ versions
60
+ >= 9.2. Please ensure to check change log to ensure that you are not
61
+ using functions that have been marked as depreciated.
62
+
63
+ Installation
64
+ ------------
65
+
66
+ Note
67
+ A full installation guide can be found in PyU4V's ReadTheDocs_ which
68
+ includes additional configuration options around PyU4V logging.
69
+
70
+ PyU4V can be installed from source, via ``pip``, or run directly from the
71
+ source directory. To clone PyU4V from source use ``git``::
72
+
73
+ $ git clone https://github.com/dell/PyU4V
74
+
75
+ To install from source navigate into the new ``PyU4V`` directory and use
76
+ ``pip``::
77
+
78
+ $ cd PyU4V/
79
+ $ pip install .
80
+
81
+ Installing via ``pip`` without cloning from source can be achieved by
82
+ specifying ``PyU4V`` as the install package for ``pip``::
83
+
84
+ $ pip install PyU4V
85
+ # Install a specific version
86
+ $ pip install PyU4V==10.2.0.1
87
+
88
+ Copy the sample ``PyU4V.conf`` provided with PyU4V to either your working
89
+ directory or within a directory named ``.PyU4V`` in your current users home
90
+ directory. The ``.sample`` suffix has to be removed for the configuration file
91
+ to become valid for loading by PyU4V::
92
+
93
+ $ mkdir ~/.PyU4V
94
+ $ cp PyU4V/PyU4V.conf.sample ~/.PyU4V/PyU4V.conf
95
+
96
+ Note
97
+ If ``PyU4V.conf`` is present in both the current working directory and the
98
+ current user's home directory, the version of ``PyU4V.conf`` in the current
99
+ working directory will take precedence.
100
+
101
+ Edit PyU4V configuration settings in ``PyU4V.conf`` under the ``[setup]``
102
+ heading, these setting will need to reflect your environment configuration::
103
+
104
+ [setup]
105
+ username=pyu4v-user
106
+ password=secret-pass
107
+ server_ip=10.0.0.75
108
+ port=8443
109
+ array=00012345678
110
+ verify=/path-to-file/server_hostname.pem
111
+
112
+ Alternatively, you can pass some or all of these details on initialisation.
113
+ Environment configuration values ``password``, ``username``, ``server_ip``,
114
+ ``port``, and ``array`` **must** be set either in the config file or on
115
+ initialisation. SSL verification as indicated by the ``verify`` key in
116
+ ``PyU4V.conf`` is discussed in the next section.
117
+
118
+ SSL CONFIGURATION
119
+ -----------------
120
+
121
+ In order to enable SSL enabled communication between your host and the
122
+ Unisphere server there are some additional steps required. First you must
123
+ extract the CA certificate from Unisphere then either add it to the system
124
+ certificate bundle or specify the path to the cert in ``PyU4V.conf``. We will
125
+ demonstrate both approaches here.
126
+
127
+ Get the CA certificate of the Unisphere server::
128
+
129
+ $ openssl s_client -showcerts -connect {server_hostname}:8443 \
130
+ </dev/null 2>/dev/null|openssl x509 -outform PEM > {cert_name}.pem
131
+
132
+ # Example
133
+ $ openssl s_client -showcerts -connect 10.0.0.75:8443 \
134
+ </dev/null 2>/dev/null|openssl x509 -outform PEM > unisphere91.pem
135
+
136
+ Where ``{server_host_ip}`` is the hostname or IP address of your Unisphere
137
+ server and ``{cert_name}`` is the name for your CA cert. This pulls the CA cert
138
+ file from the instance of Unisphere at ``10.0.0.75:8443`` and saves it as a
139
+ ``.pem`` file.
140
+
141
+ To add the cert to a CA certificate bundle, copy the ``.pem`` file to the
142
+ system certificate directory and update the CA certificate database::
143
+
144
+ # cp {cert_name}.pem /usr/share/ca-certificates/{cert_name}.crt
145
+ # dpkg-reconfigure ca-certificates
146
+ # update-ca-certificates
147
+
148
+ Once the above steps are complete you will need to specify ``verify=True`` in
149
+ ``PyU4V.conf`` for PyU4V to load the required Unisphere CA cert from the system
150
+ certificate bundle::
151
+
152
+ [setup]
153
+ verify=True
154
+
155
+ Alternatively you can skip adding the certificate to a certificate bundle and
156
+ pass it directly on PyU4V initialisation or specify the path to the certificate
157
+ directly in ``PyU4V.conf``::
158
+
159
+ [setup]
160
+ verify=/path/to/file/{cert_name}.pem
161
+
162
+ Initialise PyU4V Connection
163
+ ---------------------------
164
+
165
+ Initialising PyU4V in your Python scripts is as simple as importing the library
166
+ and initialising the connection (assuming you have ``PyU4V.conf`` configured as
167
+ outlined in the previous section).
168
+
169
+ .. code-block:: python
170
+
171
+ import PyU4V
172
+
173
+ conn = PyU4V.U4VConn()
174
+ conn.common.get_unisphere_version()
175
+ >> {'version': '10.2.0.1'}
176
+
177
+ If you wish to query another array without changing the configuration file,
178
+ call the connection ``set_array_id()`` function:
179
+
180
+ .. code-block:: python
181
+
182
+ conn.set_array_id('000197123456')
183
+
184
+ The various types of functionality provided by PyU4V is separated into logical
185
+ sections such as ``replication``, ``provisioning``, and ``performance``. For a
186
+ full API breakdown by section and some usage example please refer to the
187
+ PyU4V ReadTheDocs_.
188
+
189
+ Support, Bugs, Issues
190
+ ---------------------
191
+
192
+ Please file support requests, bugs, and issues on the PyU4V GitHub-Issues_
193
+ page for this project. For further information on opening an issue and
194
+ recommended issue templates please see the PyU4V ReadTheDocs_.
195
+
196
+ For questions asked on StackOverFlow_, please tag them with ``Dell``,
197
+ ``Dell EMC``, ``PowerMax``, and ``PyU4V`` to maximise the chances of the
198
+ correct community members assisting.
199
+
200
+ Contributing
201
+ ------------
202
+
203
+ PyU4V is built to be used openly by everyone, and in doing so we encourage
204
+ everyone to submit anything they may deem to be an improvement, addition, bug
205
+ fix, or other change which may benefit other users of PyU4V.
206
+
207
+ There are some requirements when submitting for PyU4V, such as coding
208
+ standards, building unit tests and continuous integration tests, and going
209
+ through a formal code review process, however anyone familiar with open source
210
+ development will be familiar with this process. There are a number of core
211
+ PyU4V reviewers and once a submission has approvals from two or more core
212
+ reviewers and all tests are running cleanly then the request will be merged
213
+ with the upstream PyU4V repo.
214
+
215
+ For a full breakdown of contribution requirements, coding standards, submitting
216
+ and everything else in between please refer to PyU4V ReadTheDocs_.
217
+
218
+ Tools
219
+ -----
220
+
221
+ Please refer to the Tools section of ReadTheDocs_ for OpenStack functionality
222
+ to migrate volumes to the new REST masking view structure.
223
+
224
+ Disclaimer
225
+ ----------
226
+
227
+ Unless required by applicable law or agreed to in writing, software distributed
228
+ under the Apache 2.0 License is distributed on an "AS IS" BASIS, WITHOUT
229
+ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
230
+ License for the specific language governing permissions and limitations under
231
+ the License.
232
+
233
+ .. BadgeLinks
234
+
235
+ .. |Maintenance| image:: https://img.shields.io/badge/Maintained-Yes-blue
236
+ :target: https://github.com/dell/PyU4V/commits/master
237
+ .. |OpenSource| image:: https://img.shields.io/badge/Open%20Source-Yes-blue
238
+ :target: https://github.com/dell/PyU4V
239
+ .. |AskUs| image:: https://img.shields.io/badge/Ask%20Us...-Anything-blue
240
+ :target: https://github.com/dell/PyU4V/issues
241
+ .. |License| image:: https://img.shields.io/badge/License-Apache%202.0-blue
242
+ :target: https://github.com/dell/PyU4V/blob/master/LICENSE
243
+ .. |Test| image:: https://img.shields.io/badge/Tests-Passing-blue
244
+ .. |Build| image:: https://img.shields.io/badge/Build-Passing-blue
245
+ .. |Docs| image:: https://img.shields.io/badge/Docs-Passing-blue
246
+ .. |Language| image:: https://img.shields.io/badge/Language-Python%20-blue
247
+ :target: https://www.python.org/
248
+ .. |PyVersions| image:: https://img.shields.io/badge/Python-3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9-blue
249
+ :target: https://github.com/dell/PyU4V/blob/master/README.rst
250
+ .. |Platform| image:: https://img.shields.io/badge/Platform-Linux%20%7C%20Windows-blue
251
+ :target: https://github.com/dell/PyU4V/blob/master/README.rst
252
+ .. |Unisphere| image:: https://img.shields.io/badge/Unisphere-10.0-blue
253
+ :target: https://www.dell.com/support/home/us/en/19/product-support/product/unisphere-powermax/overview
254
+ .. |DTotal| image:: https://pepy.tech/badge/pyu4v
255
+ :target: https://pepy.tech/project/pyu4v
256
+ .. |DMonth| image:: https://pepy.tech/badge/pyu4v/month
257
+ :target: https://pepy.tech/project/pyu4v/month
258
+ .. |DWeek| image:: https://pepy.tech/badge/pyu4v/week
259
+ :target: https://pepy.tech/project/pyu4v/week
260
+
261
+ .. README URL Links
262
+
263
+ .. _Requests: https://realpython.com/python-requests/
264
+ .. _Six: https://six.readthedocs.io/
265
+ .. _urllib3: https://urllib3.readthedocs.io/en/latest/
266
+ .. _ReadTheDocs: https://pyu4v.readthedocs.io/en/latest/
267
+ .. _GitHub-Issues: https://github.com/dell/PyU4V/issues
268
+ .. _StackOverFlow: https://stackoverflow.com/search?q=PyU4V
269
+
270
+ Platform: UNKNOWN
271
+ Classifier: Development Status :: 5 - Production/Stable
272
+ Classifier: Intended Audience :: Developers
273
+ Classifier: Intended Audience :: System Administrators
274
+ Classifier: License :: OSI Approved :: MIT License
275
+ Classifier: Operating System :: OS Independent
276
+ Classifier: Programming Language :: Python
277
+ Classifier: Programming Language :: Python :: 3.6
278
+ Classifier: Programming Language :: Python :: 3.7
279
+ Classifier: Programming Language :: Python :: 3.8
280
+ Classifier: Programming Language :: Python :: 3.9
281
+ Classifier: Topic :: Internet :: WWW/HTTP
282
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
283
+ Requires-Python: >=3.6, <4.0
284
+ Description-Content-Type: text/x-rst
@@ -21,9 +21,10 @@
21
21
  """__init__.py."""
22
22
 
23
23
  from .univmax_conn import U4VConn # noqa: F401
24
+ import version
24
25
 
25
26
  __title__ = 'pyu4v'
26
- __version__ = '10.2.0.0'
27
+ __version__ = version.VERSION
27
28
  __author__ = 'Dell EMC or its subsidiaries'
28
29
  __license__ = 'Apache 2.0'
29
30
  __copyright__ = 'Copyright 2023 Dell EMC Inc'
@@ -166,7 +166,7 @@ class MetroDRFunctions(object):
166
166
 
167
167
  def convert_to_metrodr_environment(
168
168
  self, storage_group_name, environment_name,
169
- metro_r1_array_id=None, _async=True):
169
+ metro_r1_array_id=None, metro_r2_dr_rdfg=None, _async=True):
170
170
  """Converts existing R2--Async--R11--Metro--R2 to Metro DR Environment.
171
171
 
172
172
  Automatically adds recovery RDFG between Metro R2 and Async R2.
@@ -174,9 +174,12 @@ class MetroDRFunctions(object):
174
174
  :param storage_group_name: storage group name containing source
175
175
  devices -- str
176
176
  :param environment_name: name of Metro Dr Environment up to 16
177
- characters-- str
177
+ characters -- str
178
178
  :param metro_r1_array_id: 12 Digit Serial Number of R1 Array for
179
179
  SRDF Metro Source Array, optional -- int
180
+ :param metro_r2_dr_rdfg: DR SRDF group that should be used to pair
181
+ Metro R2 volumes with DR volumes,
182
+ optional -- int
180
183
  :param _async: if call should be executed asynchronously or
181
184
  synchronously -- bool
182
185
  :returns: details of newly created metro dr environment -- dict
@@ -190,6 +193,9 @@ class MetroDRFunctions(object):
190
193
  'convert_to_metrodr_param': {
191
194
  'storage_group_name': storage_group_name,
192
195
  'environment_name': environment_name}}
196
+ if metro_r2_dr_rdfg:
197
+ payload['convert_to_metrodr_param'][
198
+ 'metro_r2_dr_rdfg'] = metro_r2_dr_rdfg
193
199
  if _async:
194
200
  payload.update(ASYNC_UPDATE)
195
201
 
@@ -2333,7 +2333,10 @@ class PerformanceFunctions(object):
2333
2333
 
2334
2334
  Note: This function can gather statistics for up to 10,000 volumes
2335
2335
  or 100 Storage groups per call, time range can not exceed 1 hour/60
2336
- minutes .
2336
+ minutes. If Maximum values are required you will need to ensure the
2337
+ array is registered for both realtime and diagnostic data and
2338
+ storage groups are registered for realtime data collection using
2339
+ function enable_real_time_data_collection().
2337
2340
 
2338
2341
  :param volume_range_start: 5 digit device id of first device in range
2339
2342
  -- str
File without changes
@@ -0,0 +1,47 @@
1
+ # replace_version.py
2
+ import fileinput
3
+ from version import (VERSION, API_VERSION,
4
+ UNI_VERSION, MAJOR_VERSION)
5
+ import shutil
6
+
7
+
8
+ def copy_file(original_file, new_file):
9
+ shutil.copyfile(original_file, new_file)
10
+
11
+
12
+ def update_version(version_file_list):
13
+ for filename in version_file_list:
14
+ with fileinput.input(filename, inplace=True) as f:
15
+ for line in f:
16
+ line = line.replace('{version}', VERSION)
17
+ line = line.replace('{uni_version}', UNI_VERSION)
18
+ line = line.replace('{major_version}', MAJOR_VERSION)
19
+ line = line.replace('{api_version}', API_VERSION)
20
+ print(line, end='')
21
+
22
+
23
+ def main():
24
+ version_files = [
25
+ '../../README.rst',
26
+ '../../index.rst',
27
+ '../../setup.py',
28
+ '../../docs/source/installation.rst',
29
+ '../../docs/source/index.rst'
30
+ ]
31
+
32
+ original_files = [
33
+ '../../README_template.rst',
34
+ '../../index_template.rst',
35
+ '../../setup_template.py',
36
+ '../../docs/source/installation_template.rst',
37
+ '../../docs/source/index_template.rst'
38
+ ]
39
+
40
+ for original, new in zip(original_files, version_files):
41
+ copy_file(original, new)
42
+
43
+ update_version(version_files)
44
+
45
+
46
+ if __name__ == '__main__':
47
+ main()
@@ -1371,10 +1371,11 @@ class SystemFunctions(object):
1371
1371
  resource_type=None)
1372
1372
 
1373
1373
  def configure_ldap_authentication(
1374
- self,action, ldap_server, ldap_port, bind_dn,bind_password,
1375
- user_search_path,group_name_attribute,group_member_attribute,
1374
+ self, action, ldap_server, ldap_port, bind_dn, bind_password,
1375
+ user_search_path, group_name_attribute, group_member_attribute,
1376
1376
  group_object_class, ssl_certificate,
1377
- limit_authentication_to_ldap_group_members, ldap_group_names=None):
1377
+ limit_authentication_to_ldap_group_members, user_object_class,
1378
+ user_id_attribute, ldap_group_names=None):
1378
1379
  """Enable or disable LDAP authentication.
1379
1380
  :param action: Enable or Disable, Enable requires additional payload
1380
1381
  parameters -- Bool
@@ -1397,6 +1398,8 @@ class SystemFunctions(object):
1397
1398
  -----END CERTIFICATE----- --str
1398
1399
  :param limit_authentication_to_ldap_group_members --bool
1399
1400
  :param ldap_group_names: LDAP groups separated by commas --str
1401
+ :param user_object_class --str
1402
+ :param user_id_attribute --str
1400
1403
  :returns: dict
1401
1404
  """
1402
1405
 
@@ -35,7 +35,7 @@ from PyU4V.workload_planner import WLPFunctions
35
35
  from PyU4V.volumes import VolumesFunctions
36
36
  from PyU4V.storage_groups import StorageGroupsFunctions
37
37
  from PyU4V.performance_enhanced import EnhancedPerformanceFunctions
38
-
38
+ from version import MAJOR_VERSION, API_VERSION
39
39
 
40
40
  file_path = None
41
41
  app_type = 'PyU4V-{v}'.format(v=constants.PYU4V_VERSION)
@@ -51,6 +51,7 @@ PASSWORD = constants.PASSWORD
51
51
  SERVER_IP = constants.SERVER_IP
52
52
  PORT = constants.PORT
53
53
  VERIFY = constants.VERIFY
54
+ MAJOR_VERSION = MAJOR_VERSION
54
55
 
55
56
 
56
57
  class U4VConn(object):
@@ -187,10 +188,10 @@ class U4VConn(object):
187
188
  :raises: SystemExit
188
189
  """
189
190
  uni_ver, major_ver = self.common.get_uni_version()
190
- if int(major_ver) < int(constants.UNISPHERE_VERSION):
191
- msg = ('Unisphere version {uv} does not meet the minimum '
192
- 'requirement of v10.2.x Please upgrade your version of '
193
- 'Unisphere to use this SDK. Exiting...'.format(uv=uni_ver))
191
+ if int(major_ver) < int(API_VERSION):
192
+ msg = (f'Unisphere version {uni_ver} does not meet the minimum '
193
+ f'requirement of v{MAJOR_VERSION} Please upgrade your '
194
+ f'version of Unisphere to use this SDK. Exiting...')
194
195
  sys.exit(msg)
195
196
  else:
196
197
  LOG.debug('Unisphere version {uv} passes minimum requirement '
@@ -13,6 +13,8 @@
13
13
  # limitations under the License.
14
14
  """constants.py."""
15
15
 
16
+ import version
17
+
16
18
  # Configuration constants
17
19
  SETUP = 'setup'
18
20
  ARRAY = 'array'
@@ -39,9 +41,9 @@ APP_OCT = 'application/octet-stream'
39
41
  APP_MPART = 'multipart/form-data'
40
42
 
41
43
  # Unisphere REST URI constants
42
- PYU4V_VERSION = '10.2.0.0'
43
- UNISPHERE_VERSION = '102'
44
- ENHANCED_API_VERSION = 'v1'
44
+ PYU4V_VERSION = version.VERSION
45
+ UNISPHERE_VERSION = version.API_VERSION
46
+ ENHANCED_API_VERSION = version.ENHANCED_API_VERSION
45
47
  UCODE_6079 = '6079'
46
48
  VERSION = 'version'
47
49
  ITERATOR = 'Iterator'