PyU4V 10.2.0.0__tar.gz → 10.2.0.2__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.
- pyu4v-10.2.0.2/PKG-INFO +283 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/__init__.py +2 -2
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/metro_dr.py +8 -2
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/performance.py +4 -1
- pyu4v-10.2.0.2/PyU4V/scripts/__init__.py +0 -0
- pyu4v-10.2.0.2/PyU4V/scripts/replace_version.py +47 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/system.py +6 -3
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/univmax_conn.py +6 -5
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/utils/constants.py +5 -3
- pyu4v-10.2.0.2/PyU4V/version.py +6 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/README.rst +6 -6
- pyu4v-10.2.0.2/pyu4v.egg-info/PKG-INFO +283 -0
- {PyU4V-10.2.0.0/PyU4V.egg-info → pyu4v-10.2.0.2/pyu4v.egg-info}/SOURCES.txt +9 -7
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/setup.py +2 -2
- PyU4V-10.2.0.0/LICENSE +0 -174
- PyU4V-10.2.0.0/PKG-INFO +0 -286
- PyU4V-10.2.0.0/PyU4V.egg-info/PKG-INFO +0 -286
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/clone.py +0 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/common.py +0 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/migration.py +0 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/performance_enhanced.py +0 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/provisioning.py +0 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/real_time.py +0 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/replication.py +0 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/rest_requests.py +0 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/serviceability.py +0 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/snapshot_policy.py +0 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/storage_groups.py +0 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/tools/__init__.py +0 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/tools/generate_functions.py +0 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/tools/openstack/__init__.py +0 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/tools/openstack/migrate.py +0 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/tools/openstack/migrate_utils.py +0 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/utils/__init__.py +0 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/utils/config_handler.py +0 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/utils/console.py +0 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/utils/decorators.py +0 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/utils/exception.py +0 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/utils/file_handler.py +0 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/utils/performance_category_map.py +0 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/utils/performance_constants.py +0 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/utils/time_handler.py +0 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/utils/utils.py +0 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/volumes.py +0 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/PyU4V/workload_planner.py +0 -0
- {PyU4V-10.2.0.0/PyU4V.egg-info → pyu4v-10.2.0.2/pyu4v.egg-info}/dependency_links.txt +0 -0
- {PyU4V-10.2.0.0/PyU4V.egg-info → pyu4v-10.2.0.2/pyu4v.egg-info}/requires.txt +1 -1
- {PyU4V-10.2.0.0/PyU4V.egg-info → pyu4v-10.2.0.2/pyu4v.egg-info}/top_level.txt +0 -0
- {PyU4V-10.2.0.0 → pyu4v-10.2.0.2}/setup.cfg +0 -0
pyu4v-10.2.0.2/PKG-INFO
ADDED
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: pyu4v
|
|
3
|
+
Version: 10.2.0.2
|
|
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.2 |
|
|
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 versions
|
|
59
|
+
>= 9.2. Please ensure to check change log to ensure that you are not
|
|
60
|
+
using functions that have been marked as depreciated.
|
|
61
|
+
|
|
62
|
+
Installation
|
|
63
|
+
------------
|
|
64
|
+
|
|
65
|
+
Note
|
|
66
|
+
A full installation guide can be found in PyU4V's ReadTheDocs_ which
|
|
67
|
+
includes additional configuration options around PyU4V logging.
|
|
68
|
+
|
|
69
|
+
PyU4V can be installed from source, via ``pip``, or run directly from the
|
|
70
|
+
source directory. To clone PyU4V from source use ``git``::
|
|
71
|
+
|
|
72
|
+
$ git clone https://github.com/dell/PyU4V
|
|
73
|
+
|
|
74
|
+
To install from source navigate into the new ``PyU4V`` directory and use
|
|
75
|
+
``pip``::
|
|
76
|
+
|
|
77
|
+
$ cd PyU4V/
|
|
78
|
+
$ pip install .
|
|
79
|
+
|
|
80
|
+
Installing via ``pip`` without cloning from source can be achieved by
|
|
81
|
+
specifying ``PyU4V`` as the install package for ``pip``::
|
|
82
|
+
|
|
83
|
+
$ pip install PyU4V
|
|
84
|
+
# Install a specific version
|
|
85
|
+
$ pip install PyU4V==10.2.0.1
|
|
86
|
+
|
|
87
|
+
Copy the sample ``PyU4V.conf`` provided with PyU4V to either your working
|
|
88
|
+
directory or within a directory named ``.PyU4V`` in your current users home
|
|
89
|
+
directory. The ``.sample`` suffix has to be removed for the configuration file
|
|
90
|
+
to become valid for loading by PyU4V::
|
|
91
|
+
|
|
92
|
+
$ mkdir ~/.PyU4V
|
|
93
|
+
$ cp PyU4V/PyU4V.conf.sample ~/.PyU4V/PyU4V.conf
|
|
94
|
+
|
|
95
|
+
Note
|
|
96
|
+
If ``PyU4V.conf`` is present in both the current working directory and the
|
|
97
|
+
current user's home directory, the version of ``PyU4V.conf`` in the current
|
|
98
|
+
working directory will take precedence.
|
|
99
|
+
|
|
100
|
+
Edit PyU4V configuration settings in ``PyU4V.conf`` under the ``[setup]``
|
|
101
|
+
heading, these setting will need to reflect your environment configuration::
|
|
102
|
+
|
|
103
|
+
[setup]
|
|
104
|
+
username=pyu4v-user
|
|
105
|
+
password=secret-pass
|
|
106
|
+
server_ip=10.0.0.75
|
|
107
|
+
port=8443
|
|
108
|
+
array=00012345678
|
|
109
|
+
verify=/path-to-file/server_hostname.pem
|
|
110
|
+
|
|
111
|
+
Alternatively, you can pass some or all of these details on initialisation.
|
|
112
|
+
Environment configuration values ``password``, ``username``, ``server_ip``,
|
|
113
|
+
``port``, and ``array`` **must** be set either in the config file or on
|
|
114
|
+
initialisation. SSL verification as indicated by the ``verify`` key in
|
|
115
|
+
``PyU4V.conf`` is discussed in the next section.
|
|
116
|
+
|
|
117
|
+
SSL CONFIGURATION
|
|
118
|
+
-----------------
|
|
119
|
+
|
|
120
|
+
In order to enable SSL enabled communication between your host and the
|
|
121
|
+
Unisphere server there are some additional steps required. First you must
|
|
122
|
+
extract the CA certificate from Unisphere then either add it to the system
|
|
123
|
+
certificate bundle or specify the path to the cert in ``PyU4V.conf``. We will
|
|
124
|
+
demonstrate both approaches here.
|
|
125
|
+
|
|
126
|
+
Get the CA certificate of the Unisphere server::
|
|
127
|
+
|
|
128
|
+
$ openssl s_client -showcerts -connect {server_hostname}:8443 \
|
|
129
|
+
</dev/null 2>/dev/null|openssl x509 -outform PEM > {cert_name}.pem
|
|
130
|
+
|
|
131
|
+
# Example
|
|
132
|
+
$ openssl s_client -showcerts -connect 10.0.0.75:8443 \
|
|
133
|
+
</dev/null 2>/dev/null|openssl x509 -outform PEM > unisphere91.pem
|
|
134
|
+
|
|
135
|
+
Where ``{server_host_ip}`` is the hostname or IP address of your Unisphere
|
|
136
|
+
server and ``{cert_name}`` is the name for your CA cert. This pulls the CA cert
|
|
137
|
+
file from the instance of Unisphere at ``10.0.0.75:8443`` and saves it as a
|
|
138
|
+
``.pem`` file.
|
|
139
|
+
|
|
140
|
+
To add the cert to a CA certificate bundle, copy the ``.pem`` file to the
|
|
141
|
+
system certificate directory and update the CA certificate database::
|
|
142
|
+
|
|
143
|
+
# cp {cert_name}.pem /usr/share/ca-certificates/{cert_name}.crt
|
|
144
|
+
# dpkg-reconfigure ca-certificates
|
|
145
|
+
# update-ca-certificates
|
|
146
|
+
|
|
147
|
+
Once the above steps are complete you will need to specify ``verify=True`` in
|
|
148
|
+
``PyU4V.conf`` for PyU4V to load the required Unisphere CA cert from the system
|
|
149
|
+
certificate bundle::
|
|
150
|
+
|
|
151
|
+
[setup]
|
|
152
|
+
verify=True
|
|
153
|
+
|
|
154
|
+
Alternatively you can skip adding the certificate to a certificate bundle and
|
|
155
|
+
pass it directly on PyU4V initialisation or specify the path to the certificate
|
|
156
|
+
directly in ``PyU4V.conf``::
|
|
157
|
+
|
|
158
|
+
[setup]
|
|
159
|
+
verify=/path/to/file/{cert_name}.pem
|
|
160
|
+
|
|
161
|
+
Initialise PyU4V Connection
|
|
162
|
+
---------------------------
|
|
163
|
+
|
|
164
|
+
Initialising PyU4V in your Python scripts is as simple as importing the library
|
|
165
|
+
and initialising the connection (assuming you have ``PyU4V.conf`` configured as
|
|
166
|
+
outlined in the previous section).
|
|
167
|
+
|
|
168
|
+
.. code-block:: python
|
|
169
|
+
|
|
170
|
+
import PyU4V
|
|
171
|
+
|
|
172
|
+
conn = PyU4V.U4VConn()
|
|
173
|
+
conn.common.get_unisphere_version()
|
|
174
|
+
>> {'version': '10.2.0.2'}
|
|
175
|
+
|
|
176
|
+
If you wish to query another array without changing the configuration file,
|
|
177
|
+
call the connection ``set_array_id()`` function:
|
|
178
|
+
|
|
179
|
+
.. code-block:: python
|
|
180
|
+
|
|
181
|
+
conn.set_array_id('000197123456')
|
|
182
|
+
|
|
183
|
+
The various types of functionality provided by PyU4V is separated into logical
|
|
184
|
+
sections such as ``replication``, ``provisioning``, and ``performance``. For a
|
|
185
|
+
full API breakdown by section and some usage example please refer to the
|
|
186
|
+
PyU4V ReadTheDocs_.
|
|
187
|
+
|
|
188
|
+
Support, Bugs, Issues
|
|
189
|
+
---------------------
|
|
190
|
+
|
|
191
|
+
Please file support requests, bugs, and issues on the PyU4V GitHub-Issues_
|
|
192
|
+
page for this project. For further information on opening an issue and
|
|
193
|
+
recommended issue templates please see the PyU4V ReadTheDocs_.
|
|
194
|
+
|
|
195
|
+
For questions asked on StackOverFlow_, please tag them with ``Dell``,
|
|
196
|
+
``Dell EMC``, ``PowerMax``, and ``PyU4V`` to maximise the chances of the
|
|
197
|
+
correct community members assisting.
|
|
198
|
+
|
|
199
|
+
Contributing
|
|
200
|
+
------------
|
|
201
|
+
|
|
202
|
+
PyU4V is built to be used openly by everyone, and in doing so we encourage
|
|
203
|
+
everyone to submit anything they may deem to be an improvement, addition, bug
|
|
204
|
+
fix, or other change which may benefit other users of PyU4V.
|
|
205
|
+
|
|
206
|
+
There are some requirements when submitting for PyU4V, such as coding
|
|
207
|
+
standards, building unit tests and continuous integration tests, and going
|
|
208
|
+
through a formal code review process, however anyone familiar with open source
|
|
209
|
+
development will be familiar with this process. There are a number of core
|
|
210
|
+
PyU4V reviewers and once a submission has approvals from two or more core
|
|
211
|
+
reviewers and all tests are running cleanly then the request will be merged
|
|
212
|
+
with the upstream PyU4V repo.
|
|
213
|
+
|
|
214
|
+
For a full breakdown of contribution requirements, coding standards, submitting
|
|
215
|
+
and everything else in between please refer to PyU4V ReadTheDocs_.
|
|
216
|
+
|
|
217
|
+
Tools
|
|
218
|
+
-----
|
|
219
|
+
|
|
220
|
+
Please refer to the Tools section of ReadTheDocs_ for OpenStack functionality
|
|
221
|
+
to migrate volumes to the new REST masking view structure.
|
|
222
|
+
|
|
223
|
+
Disclaimer
|
|
224
|
+
----------
|
|
225
|
+
|
|
226
|
+
Unless required by applicable law or agreed to in writing, software distributed
|
|
227
|
+
under the Apache 2.0 License is distributed on an "AS IS" BASIS, WITHOUT
|
|
228
|
+
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
229
|
+
License for the specific language governing permissions and limitations under
|
|
230
|
+
the License.
|
|
231
|
+
|
|
232
|
+
.. BadgeLinks
|
|
233
|
+
|
|
234
|
+
.. |Maintenance| image:: https://img.shields.io/badge/Maintained-Yes-blue
|
|
235
|
+
:target: https://github.com/dell/PyU4V/commits/master
|
|
236
|
+
.. |OpenSource| image:: https://img.shields.io/badge/Open%20Source-Yes-blue
|
|
237
|
+
:target: https://github.com/dell/PyU4V
|
|
238
|
+
.. |AskUs| image:: https://img.shields.io/badge/Ask%20Us...-Anything-blue
|
|
239
|
+
:target: https://github.com/dell/PyU4V/issues
|
|
240
|
+
.. |License| image:: https://img.shields.io/badge/License-Apache%202.0-blue
|
|
241
|
+
:target: https://github.com/dell/PyU4V/blob/master/LICENSE
|
|
242
|
+
.. |Test| image:: https://img.shields.io/badge/Tests-Passing-blue
|
|
243
|
+
.. |Build| image:: https://img.shields.io/badge/Build-Passing-blue
|
|
244
|
+
.. |Docs| image:: https://img.shields.io/badge/Docs-Passing-blue
|
|
245
|
+
.. |Language| image:: https://img.shields.io/badge/Language-Python%20-blue
|
|
246
|
+
:target: https://www.python.org/
|
|
247
|
+
.. |PyVersions| image:: https://img.shields.io/badge/Python-3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9-blue
|
|
248
|
+
:target: https://github.com/dell/PyU4V/blob/master/README.rst
|
|
249
|
+
.. |Platform| image:: https://img.shields.io/badge/Platform-Linux%20%7C%20Windows-blue
|
|
250
|
+
:target: https://github.com/dell/PyU4V/blob/master/README.rst
|
|
251
|
+
.. |Unisphere| image:: https://img.shields.io/badge/Unisphere-10.0-blue
|
|
252
|
+
:target: https://www.dell.com/support/home/us/en/19/product-support/product/unisphere-powermax/overview
|
|
253
|
+
.. |DTotal| image:: https://pepy.tech/badge/pyu4v
|
|
254
|
+
:target: https://pepy.tech/project/pyu4v
|
|
255
|
+
.. |DMonth| image:: https://pepy.tech/badge/pyu4v/month
|
|
256
|
+
:target: https://pepy.tech/project/pyu4v/month
|
|
257
|
+
.. |DWeek| image:: https://pepy.tech/badge/pyu4v/week
|
|
258
|
+
:target: https://pepy.tech/project/pyu4v/week
|
|
259
|
+
|
|
260
|
+
.. README URL Links
|
|
261
|
+
|
|
262
|
+
.. _Requests: https://realpython.com/python-requests/
|
|
263
|
+
.. _Six: https://six.readthedocs.io/
|
|
264
|
+
.. _urllib3: https://urllib3.readthedocs.io/en/latest/
|
|
265
|
+
.. _ReadTheDocs: https://pyu4v.readthedocs.io/en/latest/
|
|
266
|
+
.. _GitHub-Issues: https://github.com/dell/PyU4V/issues
|
|
267
|
+
.. _StackOverFlow: https://stackoverflow.com/search?q=PyU4V
|
|
268
|
+
|
|
269
|
+
Platform: UNKNOWN
|
|
270
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
271
|
+
Classifier: Intended Audience :: Developers
|
|
272
|
+
Classifier: Intended Audience :: System Administrators
|
|
273
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
274
|
+
Classifier: Operating System :: OS Independent
|
|
275
|
+
Classifier: Programming Language :: Python
|
|
276
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
277
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
278
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
279
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
280
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
|
281
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
282
|
+
Requires-Python: >=3.6, <4.0
|
|
283
|
+
Description-Content-Type: text/x-rst
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"""__init__.py."""
|
|
22
22
|
|
|
23
23
|
from .univmax_conn import U4VConn # noqa: F401
|
|
24
|
-
|
|
24
|
+
from . import version
|
|
25
25
|
__title__ = 'pyu4v'
|
|
26
|
-
__version__ =
|
|
26
|
+
__version__ = version.VERSION
|
|
27
27
|
__author__ = 'Dell EMC or its subsidiaries'
|
|
28
28
|
__license__ = 'Apache 2.0'
|
|
29
29
|
__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 PyU4V.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,
|
|
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 PyU4V.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(
|
|
191
|
-
msg = ('Unisphere version {
|
|
192
|
-
'requirement of
|
|
193
|
-
'Unisphere to use this SDK. Exiting...'
|
|
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 PyU4V.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 =
|
|
43
|
-
UNISPHERE_VERSION =
|
|
44
|
-
ENHANCED_API_VERSION =
|
|
44
|
+
PYU4V_VERSION = PyU4V.version.VERSION
|
|
45
|
+
UNISPHERE_VERSION = PyU4V.version.API_VERSION
|
|
46
|
+
ENHANCED_API_VERSION = PyU4V.version.ENHANCED_API_VERSION
|
|
45
47
|
UCODE_6079 = '6079'
|
|
46
48
|
VERSION = 'version'
|
|
47
49
|
ITERATOR = 'Iterator'
|
|
@@ -20,15 +20,15 @@ Note
|
|
|
20
20
|
where ``{ip-address}`` is the IP address of your Unisphere server and
|
|
21
21
|
``{port}`` is the port it is listening on.
|
|
22
22
|
|
|
23
|
-
PyU4V Version 10.
|
|
23
|
+
PyU4V Version 10.2
|
|
24
24
|
------------------
|
|
25
25
|
|
|
26
26
|
+-------------------------------+----------------------------+
|
|
27
27
|
| **Author** | Dell EMC |
|
|
28
28
|
+-------------------------------+----------------------------+
|
|
29
|
-
| **PyU4V Version** | 10.2.0.
|
|
29
|
+
| **PyU4V Version** | 10.2.0.2 |
|
|
30
30
|
+-------------------------------+----------------------------+
|
|
31
|
-
| **Minimum Unisphere Version** | 10.2.0
|
|
31
|
+
| **Minimum Unisphere Version** | 10.2.0 |
|
|
32
32
|
+-------------------------------+----------------------------+
|
|
33
33
|
| **Array Model** | VMAX-3, VMAX AFA, PowerMax |
|
|
34
34
|
+-------------------------------+----------------------------+
|
|
@@ -47,7 +47,7 @@ Note
|
|
|
47
47
|
version of Unisphere older than 9.1.x
|
|
48
48
|
|
|
49
49
|
Note
|
|
50
|
-
PyU4V version 10.
|
|
50
|
+
PyU4V version 10.2 is compatible with scripts written for PyU4V versions
|
|
51
51
|
>= 9.2. Please ensure to check change log to ensure that you are not
|
|
52
52
|
using functions that have been marked as depreciated.
|
|
53
53
|
|
|
@@ -74,7 +74,7 @@ specifying ``PyU4V`` as the install package for ``pip``::
|
|
|
74
74
|
|
|
75
75
|
$ pip install PyU4V
|
|
76
76
|
# Install a specific version
|
|
77
|
-
$ pip install PyU4V==10.2.0.
|
|
77
|
+
$ pip install PyU4V==10.2.0.1
|
|
78
78
|
|
|
79
79
|
Copy the sample ``PyU4V.conf`` provided with PyU4V to either your working
|
|
80
80
|
directory or within a directory named ``.PyU4V`` in your current users home
|
|
@@ -163,7 +163,7 @@ outlined in the previous section).
|
|
|
163
163
|
|
|
164
164
|
conn = PyU4V.U4VConn()
|
|
165
165
|
conn.common.get_unisphere_version()
|
|
166
|
-
>> {'version': '
|
|
166
|
+
>> {'version': '10.2.0.2'}
|
|
167
167
|
|
|
168
168
|
If you wish to query another array without changing the configuration file,
|
|
169
169
|
call the connection ``set_array_id()`` function:
|