PyU4V 10.1.0.2__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.1.0.2 → PyU4V-10.2.0.1}/PyU4V/__init__.py +3 -2
  3. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/metro_dr.py +18 -7
  4. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/performance.py +25 -121
  5. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/provisioning.py +30 -234
  6. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/real_time.py +10 -6
  7. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/replication.py +4 -1
  8. PyU4V-10.2.0.1/PyU4V/scripts/__init__.py +0 -0
  9. PyU4V-10.2.0.1/PyU4V/scripts/replace_version.py +47 -0
  10. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/system.py +68 -3
  11. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/tools/generate_functions.py +2 -2
  12. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/univmax_conn.py +6 -5
  13. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/utils/constants.py +5 -3
  14. PyU4V-10.2.0.1/PyU4V.egg-info/PKG-INFO +284 -0
  15. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V.egg-info/SOURCES.txt +2 -1
  16. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V.egg-info/requires.txt +1 -2
  17. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/README.rst +8 -7
  18. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/setup.py +3 -4
  19. PyU4V-10.1.0.2/LICENSE +0 -174
  20. PyU4V-10.1.0.2/PKG-INFO +0 -286
  21. PyU4V-10.1.0.2/PyU4V.egg-info/PKG-INFO +0 -286
  22. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/clone.py +0 -0
  23. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/common.py +0 -0
  24. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/migration.py +0 -0
  25. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/performance_enhanced.py +0 -0
  26. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/rest_requests.py +0 -0
  27. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/serviceability.py +0 -0
  28. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/snapshot_policy.py +0 -0
  29. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/storage_groups.py +0 -0
  30. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/tools/__init__.py +0 -0
  31. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/tools/openstack/__init__.py +0 -0
  32. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/tools/openstack/migrate.py +0 -0
  33. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/tools/openstack/migrate_utils.py +0 -0
  34. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/utils/__init__.py +0 -0
  35. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/utils/config_handler.py +0 -0
  36. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/utils/console.py +0 -0
  37. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/utils/decorators.py +0 -0
  38. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/utils/exception.py +0 -0
  39. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/utils/file_handler.py +0 -0
  40. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/utils/performance_category_map.py +0 -0
  41. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/utils/performance_constants.py +0 -0
  42. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/utils/time_handler.py +0 -0
  43. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/utils/utils.py +0 -0
  44. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/volumes.py +0 -0
  45. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V/workload_planner.py +0 -0
  46. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V.egg-info/dependency_links.txt +0 -0
  47. {PyU4V-10.1.0.2 → PyU4V-10.2.0.1}/PyU4V.egg-info/top_level.txt +0 -0
  48. {PyU4V-10.1.0.2 → 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.1.0.2'
27
+ __version__ = version.VERSION
27
28
  __author__ = 'Dell EMC or its subsidiaries'
28
29
  __license__ = 'Apache 2.0'
29
- __copyright__ = 'Copyright 2021 Dell EMC Inc'
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
 
@@ -233,7 +239,7 @@ class MetroDRFunctions(object):
233
239
  def modify_metrodr_environment(
234
240
  self, environment_name, action, metro=False,
235
241
  dr=False, keep_r2=False, force=False, symforce=False,
236
- _async=False, dr_replication_mode=None):
242
+ _async=False, dr_replication_mode=None, reverse=False):
237
243
  """Performs Functions to modify state of MetroDR environment.
238
244
 
239
245
  :param environment_name: name of Metro Dr Environment up to 16
@@ -258,6 +264,7 @@ class MetroDRFunctions(object):
258
264
  synchronously -- bool
259
265
  :param dr_replication_mode: set mode of DR link, AdaptiveCopyDisk or
260
266
  Asynchronous -- str
267
+ :param reverse: reverse the direction of the link -- bool
261
268
  :returns: details of metro dr environment and state -- dict
262
269
  """
263
270
  metro_dr_action = constants.METRO_DR_ACTIONS.get(action.upper())
@@ -292,10 +299,14 @@ class MetroDRFunctions(object):
292
299
  'SRDF leg, please choice either Metro or DR not both')
293
300
  LOG.exception(msg)
294
301
  raise exception.InvalidInputException(message=msg)
295
-
296
- payload.update({action_params: {
297
- 'metro': metro, 'force': force, 'dr': dr,
298
- 'symforce': symforce}})
302
+ if metro and not dr and metro_dr_action == 'Establish':
303
+ payload.update({action_params: {
304
+ 'metro': metro, 'force': force, 'dr': dr,
305
+ 'symforce': symforce, 'reverse': reverse}})
306
+ else:
307
+ payload.update({action_params: {
308
+ 'metro': metro, 'force': force, 'dr': dr,
309
+ 'symforce': symforce}})
299
310
  elif metro_dr_action == 'SetMode':
300
311
  payload.update({
301
312
  action_params: {
@@ -18,10 +18,8 @@ import logging
18
18
  import re
19
19
  import socket
20
20
  import time
21
-
22
21
  from PyU4V import common
23
22
  from PyU4V import real_time
24
- from PyU4V.utils import decorators
25
23
  from PyU4V.utils import exception
26
24
  from PyU4V.utils import file_handler
27
25
  from PyU4V.utils import performance_constants as pc
@@ -66,25 +64,6 @@ class PerformanceFunctions(object):
66
64
  """
67
65
  self.recency = minutes
68
66
 
69
- @decorators.refactoring_notice(
70
- 'PyU4V.performance',
71
- 'PyU4V.performance.is_array_diagnostic_performance_registered',
72
- 9.2, 10.1)
73
- def is_array_performance_registered(self, array_id=None):
74
- """Check if an array is registered for diagnostic performance data.
75
-
76
- DEPRECATION NOTICE:
77
- PerformanceFunctions.is_array_performance_registered() will be
78
- refactored in PyU4V version 10.1 in favour of
79
- PerformanceFunctions.is_array_diagnostic_performance_registered().
80
- For further information please consult PyU4V 9.2 release notes.
81
-
82
- :param array_id: array id -- str
83
- :returns: is diagnostic registered -- bool
84
- """
85
- array_id = self.array_id if not array_id else array_id
86
- return self.is_array_diagnostic_performance_registered(array_id)
87
-
88
67
  def is_array_diagnostic_performance_registered(self, array_id=None):
89
68
  """Check if an array is registered for diagnostic performance data.
90
69
 
@@ -242,7 +221,8 @@ class PerformanceFunctions(object):
242
221
 
243
222
  if self.is_array_real_time_performance_registered(array_id):
244
223
  # Retain the existing diagnostic performance setting
245
- diag_reg = self.is_array_performance_registered(array_id)
224
+ diag_reg = self.is_array_diagnostic_performance_registered(
225
+ array_id)
246
226
 
247
227
  response = self.post_request(
248
228
  category=pc.PERFORMANCE, resource_level=pc.ARRAY,
@@ -860,7 +840,8 @@ class PerformanceFunctions(object):
860
840
  first_threshold_samples=5,
861
841
  first_threshold_severity=pc.WARN_LVL,
862
842
  second_threshold_occurrences=3, second_threshold_samples=5,
863
- second_threshold_severity=pc.CRIT_LVL):
843
+ second_threshold_severity=pc.CRIT_LVL,
844
+ include_realtime_trace=False):
864
845
  """Edit an existing global threshold across all arrays.
865
846
 
866
847
  :param category: category id -- str
@@ -878,19 +859,23 @@ class PerformanceFunctions(object):
878
859
  :param second_threshold_severity: error severity, valid values are
879
860
  'INFORMATION', 'WARNING', and
880
861
  'CRITICAL' -- str
862
+ :param include_realtime_trace: if threshold is breached in addition
863
+ to alert a performance
881
864
  :returns: operation success details -- dict
882
865
  """
883
- payload = dict()
884
- payload[pc.METRIC] = metric
885
- payload[pc.ALERT] = alert
886
- payload[pc.FIRST_THRESH] = str(first_threshold)
887
- payload[pc.FIRST_THRESH_OCC] = str(first_threshold_occurrences)
888
- payload[pc.FIRST_THRESH_SAMP] = str(first_threshold_samples)
889
- payload[pc.FIRST_THRESH_SEV] = first_threshold_severity
890
- payload[pc.SEC_THRESH] = str(second_threshold)
891
- payload[pc.SEC_THRESH_OCC] = str(second_threshold_occurrences)
892
- payload[pc.SEC_THRESH_SAMP] = str(second_threshold_samples)
893
- payload[pc.SEC_THRESH_SEV] = second_threshold_severity
866
+ payload = {
867
+ "metric": metric,
868
+ "firstThreshold": str(first_threshold),
869
+ "secondThreshold": str(second_threshold),
870
+ "alert": alert,
871
+ "firstThresholdOccurrrences": str(first_threshold_occurrences),
872
+ "firstThresholdSamples": str(first_threshold_samples),
873
+ "firstThresholdSeverity": str(first_threshold_severity),
874
+ "secondThresholdOccurrrences": str(second_threshold_occurrences),
875
+ "secondThresholdSamples": str(second_threshold_samples),
876
+ "secondThresholdSeverity": str(second_threshold_severity),
877
+ "includeRealTimeTraceOnCritical": include_realtime_trace
878
+ }
894
879
 
895
880
  return self.put_request(
896
881
  category=pc.PERFORMANCE, resource_level=pc.THRESHOLD,
@@ -964,7 +949,8 @@ class PerformanceFunctions(object):
964
949
  self.update_threshold_settings(
965
950
  category=category_list[i], metric=metric_list[i],
966
951
  alert=notify_list[i], first_threshold=f_threshold_list[i],
967
- second_threshold=s_threshold_list[i])
952
+ second_threshold=s_threshold_list[i],
953
+ include_realtime_trace=False)
968
954
 
969
955
  def get_array_keys(self):
970
956
  """List Arrays registered for performance data collection.
@@ -1160,41 +1146,6 @@ class PerformanceFunctions(object):
1160
1146
  data_format=data_format, request_body=request_body,
1161
1147
  start_time=start_time, end_time=end_time, recency=recency)
1162
1148
 
1163
- def get_cloud_provider_keys(self, array_id=None):
1164
- """List cache partitions for the given array.
1165
-
1166
- :param array_id: array id -- str
1167
- :returns: cache partition info with first and last available
1168
- dates -- list
1169
- """
1170
- array_id = self.array_id if not array_id else array_id
1171
- key_list = self.get_performance_key_list(category=pc.CLOUD_PROVIDER,
1172
- array_id=array_id)
1173
- return key_list.get(
1174
- pc.CLOUD_PROVIDER_INFO, list()) if key_list else list()
1175
-
1176
- def get_cloud_provider_stats(
1177
- self, cloud_provider_id, metrics, array_id=None,
1178
- data_format=pc.AVERAGE, start_time=None, end_time=None,
1179
- recency=None):
1180
- """List time range performance data for given cache partition.
1181
-
1182
- :param cloud_provider_id: cache partition id -- str
1183
- :param metrics: performance metrics to retrieve -- str or list
1184
- :param array_id: array id -- str
1185
- :param data_format: response data format 'Average' or 'Maximum' -- str
1186
- :param start_time: timestamp in milliseconds since epoch -- str
1187
- :param end_time: timestamp in milliseconds since epoch -- str
1188
- :param recency: check recency of timestamp in minutes -- int
1189
- :returns: performance metrics -- dict
1190
- """
1191
- array_id = self.array_id if not array_id else array_id
1192
- request_body = {pc.CLOUD_PROVIDER_ID: cloud_provider_id}
1193
- return self.get_performance_stats(
1194
- array_id=array_id, category=pc.CLOUD_PROVIDER, metrics=metrics,
1195
- data_format=data_format, request_body=request_body,
1196
- start_time=start_time, end_time=end_time, recency=recency)
1197
-
1198
1149
  def get_device_group_keys(self, array_id=None):
1199
1150
  """List device groups for the given array.
1200
1151
 
@@ -1793,26 +1744,6 @@ class PerformanceFunctions(object):
1793
1744
  data_format=data_format, request_body=request_body,
1794
1745
  start_time=start_time, end_time=end_time, recency=recency)
1795
1746
 
1796
- @decorators.refactoring_notice(
1797
- 'PyU4V.performance', 'get_endpoint_keys', 10.0, 10.2)
1798
- def get_iscsi_target_keys(self, array_id=None):
1799
- """List iSCSI targets for the given array.
1800
-
1801
- DEPRECATION NOTICE:
1802
- PerformanceFunctions.get_iscsi_target_keys() will be
1803
- refactored in PyU4V version 10.2 in favour of
1804
- PerformanceFunctions.get_endpoint_keys().
1805
- For further information please consult PyU4V 10.0 release notes.
1806
-
1807
- :param array_id: array_id: array id -- str
1808
- :returns: iSCSI interfaces info with first and last available
1809
- dates -- list
1810
- """
1811
- array_id = self.array_id if not array_id else array_id
1812
- key_list = self.get_performance_key_list(category=pc.ENDPOINT,
1813
- array_id=array_id)
1814
- return key_list.get(pc.ENDPOINT_INFO, list()) if key_list else list()
1815
-
1816
1747
  def get_endpoint_keys(self, array_id=None):
1817
1748
  """List endpoints for the given array.
1818
1749
 
@@ -1825,36 +1756,6 @@ class PerformanceFunctions(object):
1825
1756
  array_id=array_id)
1826
1757
  return key_list.get(pc.ENDPOINT_INFO, list()) if key_list else list()
1827
1758
 
1828
- @decorators.refactoring_notice(
1829
- 'PyU4V.performance', 'get_endpoint_stats', 10.0, 10.2)
1830
- def get_iscsi_target_stats(
1831
- self, iscsi_target_id, metrics, array_id=None,
1832
- data_format=pc.AVERAGE, start_time=None, end_time=None,
1833
- recency=None):
1834
- """List time range performance data for given iSCSI target.
1835
-
1836
- DEPRECATION NOTICE:
1837
- PerformanceFunctions.get_iscsi_target_keys() will be
1838
- refactored in PyU4V version 10.2 in favour of
1839
- PerformanceFunctions.get_endpoint_stats().
1840
- For further information please consult PyU4V 10.0 release notes.
1841
-
1842
- :param iscsi_target_id: iSCSI target id -- str
1843
- :param metrics: performance metrics to retrieve -- str or list
1844
- :param array_id: array id -- str
1845
- :param data_format: response data format 'Average' or 'Maximum' -- str
1846
- :param start_time: timestamp in milliseconds since epoch -- str
1847
- :param end_time: timestamp in milliseconds since epoch -- str
1848
- :param recency: check recency of timestamp in minutes -- int
1849
- :returns: performance metrics -- dict
1850
- """
1851
- array_id = self.array_id if not array_id else array_id
1852
- request_body = {pc.ENDPOINT_ID_METRICS: iscsi_target_id}
1853
- return self.get_performance_stats(
1854
- array_id=array_id, category=pc.ENDPOINT, metrics=metrics,
1855
- data_format=data_format, request_body=request_body,
1856
- start_time=start_time, end_time=end_time, recency=recency)
1857
-
1858
1759
  def get_endpoint_stats(
1859
1760
  self, endpoint_id, metrics, array_id=None,
1860
1761
  data_format=pc.AVERAGE, start_time=None, end_time=None,
@@ -2432,7 +2333,10 @@ class PerformanceFunctions(object):
2432
2333
 
2433
2334
  Note: This function can gather statistics for up to 10,000 volumes
2434
2335
  or 100 Storage groups per call, time range can not exceed 1 hour/60
2435
- 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().
2436
2340
 
2437
2341
  :param volume_range_start: 5 digit device id of first device in range
2438
2342
  -- str