PyU4V 10.1.0.2__tar.gz → 10.2.0.0__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.1.0.2 → PyU4V-10.2.0.0}/PKG-INFO +7 -7
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/__init__.py +2 -2
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/metro_dr.py +10 -5
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/performance.py +21 -120
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/provisioning.py +30 -234
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/real_time.py +10 -6
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/replication.py +4 -1
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/system.py +65 -3
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/tools/generate_functions.py +2 -2
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/univmax_conn.py +1 -1
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/utils/constants.py +2 -2
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V.egg-info/PKG-INFO +7 -7
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V.egg-info/requires.txt +0 -1
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/README.rst +5 -5
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/setup.py +3 -4
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/LICENSE +0 -0
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/clone.py +0 -0
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/common.py +0 -0
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/migration.py +0 -0
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/performance_enhanced.py +0 -0
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/rest_requests.py +0 -0
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/serviceability.py +0 -0
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/snapshot_policy.py +0 -0
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/storage_groups.py +0 -0
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/tools/__init__.py +0 -0
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/tools/openstack/__init__.py +0 -0
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/tools/openstack/migrate.py +0 -0
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/tools/openstack/migrate_utils.py +0 -0
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/utils/__init__.py +0 -0
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/utils/config_handler.py +0 -0
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/utils/console.py +0 -0
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/utils/decorators.py +0 -0
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/utils/exception.py +0 -0
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/utils/file_handler.py +0 -0
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/utils/performance_category_map.py +0 -0
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/utils/performance_constants.py +0 -0
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/utils/time_handler.py +0 -0
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/utils/utils.py +0 -0
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/volumes.py +0 -0
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V/workload_planner.py +0 -0
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V.egg-info/SOURCES.txt +0 -0
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V.egg-info/dependency_links.txt +0 -0
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/PyU4V.egg-info/top_level.txt +0 -0
- {PyU4V-10.1.0.2 → PyU4V-10.2.0.0}/setup.cfg +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PyU4V
|
|
3
|
-
Version: 10.
|
|
3
|
+
Version: 10.2.0.0
|
|
4
4
|
Summary: A Python library for use with Dell EMC's Unisphere for PowerMax REST API.
|
|
5
5
|
Home-page: https://github.com/dell/PyU4V/
|
|
6
6
|
Author: Dell Inc. or its subsidiaries
|
|
7
|
-
Author-email:
|
|
7
|
+
Author-email: paule.martin@dell.com
|
|
8
8
|
License: Apache 2.0
|
|
9
9
|
Platform: UNKNOWN
|
|
10
10
|
Classifier: Development Status :: 5 - Production/Stable
|
|
@@ -23,7 +23,7 @@ Requires-Python: >=3.6, <4.0
|
|
|
23
23
|
Description-Content-Type: text/x-rst
|
|
24
24
|
License-File: LICENSE
|
|
25
25
|
|
|
26
|
-
Welcome to PyU4V 10.
|
|
26
|
+
Welcome to PyU4V 10.2
|
|
27
27
|
=====================
|
|
28
28
|
|
|
29
29
|
| |Maintenance| |OpenSource| |AskUs| |License| |Test| |Build| |Docs|
|
|
@@ -51,9 +51,9 @@ PyU4V Version 10.1
|
|
|
51
51
|
+-------------------------------+----------------------------+
|
|
52
52
|
| **Author** | Dell EMC |
|
|
53
53
|
+-------------------------------+----------------------------+
|
|
54
|
-
| **PyU4V Version** | 10.
|
|
54
|
+
| **PyU4V Version** | 10.2.0.0 |
|
|
55
55
|
+-------------------------------+----------------------------+
|
|
56
|
-
| **Minimum Unisphere Version** | 10.
|
|
56
|
+
| **Minimum Unisphere Version** | 10.2.0.0 |
|
|
57
57
|
+-------------------------------+----------------------------+
|
|
58
58
|
| **Array Model** | VMAX-3, VMAX AFA, PowerMax |
|
|
59
59
|
+-------------------------------+----------------------------+
|
|
@@ -99,7 +99,7 @@ specifying ``PyU4V`` as the install package for ``pip``::
|
|
|
99
99
|
|
|
100
100
|
$ pip install PyU4V
|
|
101
101
|
# Install a specific version
|
|
102
|
-
$ pip install PyU4V==10.
|
|
102
|
+
$ pip install PyU4V==10.2.0.0
|
|
103
103
|
|
|
104
104
|
Copy the sample ``PyU4V.conf`` provided with PyU4V to either your working
|
|
105
105
|
directory or within a directory named ``.PyU4V`` in your current users home
|
|
@@ -188,7 +188,7 @@ outlined in the previous section).
|
|
|
188
188
|
|
|
189
189
|
conn = PyU4V.U4VConn()
|
|
190
190
|
conn.common.get_unisphere_version()
|
|
191
|
-
>> {'version': 'V10.
|
|
191
|
+
>> {'version': 'V10.2.0.0'}
|
|
192
192
|
|
|
193
193
|
If you wish to query another array without changing the configuration file,
|
|
194
194
|
call the connection ``set_array_id()`` function:
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
from .univmax_conn import U4VConn # noqa: F401
|
|
24
24
|
|
|
25
25
|
__title__ = 'pyu4v'
|
|
26
|
-
__version__ = '10.
|
|
26
|
+
__version__ = '10.2.0.0'
|
|
27
27
|
__author__ = 'Dell EMC or its subsidiaries'
|
|
28
28
|
__license__ = 'Apache 2.0'
|
|
29
|
-
__copyright__ = 'Copyright
|
|
29
|
+
__copyright__ = 'Copyright 2023 Dell EMC Inc'
|
|
@@ -233,7 +233,7 @@ class MetroDRFunctions(object):
|
|
|
233
233
|
def modify_metrodr_environment(
|
|
234
234
|
self, environment_name, action, metro=False,
|
|
235
235
|
dr=False, keep_r2=False, force=False, symforce=False,
|
|
236
|
-
_async=False, dr_replication_mode=None):
|
|
236
|
+
_async=False, dr_replication_mode=None, reverse=False):
|
|
237
237
|
"""Performs Functions to modify state of MetroDR environment.
|
|
238
238
|
|
|
239
239
|
:param environment_name: name of Metro Dr Environment up to 16
|
|
@@ -258,6 +258,7 @@ class MetroDRFunctions(object):
|
|
|
258
258
|
synchronously -- bool
|
|
259
259
|
:param dr_replication_mode: set mode of DR link, AdaptiveCopyDisk or
|
|
260
260
|
Asynchronous -- str
|
|
261
|
+
:param reverse: reverse the direction of the link -- bool
|
|
261
262
|
:returns: details of metro dr environment and state -- dict
|
|
262
263
|
"""
|
|
263
264
|
metro_dr_action = constants.METRO_DR_ACTIONS.get(action.upper())
|
|
@@ -292,10 +293,14 @@ class MetroDRFunctions(object):
|
|
|
292
293
|
'SRDF leg, please choice either Metro or DR not both')
|
|
293
294
|
LOG.exception(msg)
|
|
294
295
|
raise exception.InvalidInputException(message=msg)
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
296
|
+
if metro and not dr and metro_dr_action == 'Establish':
|
|
297
|
+
payload.update({action_params: {
|
|
298
|
+
'metro': metro, 'force': force, 'dr': dr,
|
|
299
|
+
'symforce': symforce, 'reverse': reverse}})
|
|
300
|
+
else:
|
|
301
|
+
payload.update({action_params: {
|
|
302
|
+
'metro': metro, 'force': force, 'dr': dr,
|
|
303
|
+
'symforce': symforce}})
|
|
299
304
|
elif metro_dr_action == 'SetMode':
|
|
300
305
|
payload.update({
|
|
301
306
|
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.
|
|
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 =
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
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,
|
|
@@ -65,6 +65,7 @@ class ProvisioningFunctions(object):
|
|
|
65
65
|
self.create_resource = self.common.create_resource
|
|
66
66
|
self.modify_resource = self.common.modify_resource
|
|
67
67
|
self.delete_resource = self.common.delete_resource
|
|
68
|
+
self.version = constants.UNISPHERE_VERSION
|
|
68
69
|
|
|
69
70
|
def get_array(self, array_id=None):
|
|
70
71
|
"""Query for details of an array from SLOPROVISIONING endpoint.
|
|
@@ -78,120 +79,6 @@ class ProvisioningFunctions(object):
|
|
|
78
79
|
resource_level_id=array_id)
|
|
79
80
|
return response if response else dict()
|
|
80
81
|
|
|
81
|
-
@decorators.refactoring_notice(
|
|
82
|
-
'SystemFunctions', 'get_director', 10.0, 10.2)
|
|
83
|
-
def get_director(self, director):
|
|
84
|
-
"""Query for details of a director for a symmetrix.
|
|
85
|
-
|
|
86
|
-
DEPRECATION NOTICE: ProvisioningFunctions.get_director()
|
|
87
|
-
will be removed in PyU4V version 10.2 in favour of
|
|
88
|
-
SystemFunctions.get_director(). For further
|
|
89
|
-
information please consult PyU4V 10.0 release notes.
|
|
90
|
-
|
|
91
|
-
For V4 you must use SystemFunctions.get_director()
|
|
92
|
-
|
|
93
|
-
:param director: the director ID e.g. FA-1D -- str
|
|
94
|
-
:returns: director details -- dict
|
|
95
|
-
"""
|
|
96
|
-
return self.get_resource(
|
|
97
|
-
category=SYSTEM,
|
|
98
|
-
resource_level=SYMMETRIX, resource_level_id=self.array_id,
|
|
99
|
-
resource_type=DIRECTOR, resource_type_id=director)
|
|
100
|
-
|
|
101
|
-
@decorators.refactoring_notice(
|
|
102
|
-
'SystemFunctions', 'get_director_list', 10.0, 10.2)
|
|
103
|
-
def get_director_list(self):
|
|
104
|
-
"""Query for details of Symmetrix directors for a symmetrix.
|
|
105
|
-
|
|
106
|
-
DEPRECATION NOTICE: ProvisioningFunctions.get_director()
|
|
107
|
-
will be removed in PyU4V version 10.2 in favour of
|
|
108
|
-
SystemFunctions.get_director_list(). For further
|
|
109
|
-
information please consult PyU4V 10.0 release notes.
|
|
110
|
-
|
|
111
|
-
For V4 you must use SystemFunctions.get_director_list()
|
|
112
|
-
|
|
113
|
-
:returns: directors -- list
|
|
114
|
-
"""
|
|
115
|
-
response = self.get_resource(
|
|
116
|
-
category=SYSTEM,
|
|
117
|
-
resource_level=SYMMETRIX, resource_level_id=self.array_id,
|
|
118
|
-
resource_type=DIRECTOR)
|
|
119
|
-
return response.get('directorId', list()) if response else list()
|
|
120
|
-
|
|
121
|
-
@decorators.refactoring_notice(
|
|
122
|
-
'SystemFunctions', 'get_director_port', 10.0, 10.2)
|
|
123
|
-
def get_director_port(self, director, port_no):
|
|
124
|
-
"""Get details of the symmetrix director port.
|
|
125
|
-
|
|
126
|
-
DEPRECATION NOTICE: ProvisioningFunctions.get_director()
|
|
127
|
-
will be removed in PyU4V version 10.2 in favour of
|
|
128
|
-
SystemFunctions.get_director_port(). For further
|
|
129
|
-
information please consult PyU4V 10.0 release notes.
|
|
130
|
-
|
|
131
|
-
For V4 you must use SystemFunctions.get_director_port()
|
|
132
|
-
|
|
133
|
-
:param director: the director ID e.g. FA-1D -- str
|
|
134
|
-
:param port_no: the port number e.g. 1 -- str
|
|
135
|
-
:returns: director port details -- dict
|
|
136
|
-
"""
|
|
137
|
-
return self.get_resource(
|
|
138
|
-
category=SYSTEM,
|
|
139
|
-
resource_level=SYMMETRIX, resource_level_id=self.array_id,
|
|
140
|
-
resource_type=DIRECTOR, resource_type_id=director,
|
|
141
|
-
resource=PORT, resource_id=port_no)
|
|
142
|
-
|
|
143
|
-
@decorators.refactoring_notice(
|
|
144
|
-
'SystemFunctions', 'get_director_port_list', 10.0, 10.2)
|
|
145
|
-
def get_director_port_list(self, director, filters=None):
|
|
146
|
-
"""Get list of the ports on a particular director.
|
|
147
|
-
|
|
148
|
-
Can be filtered by optional parameters, please see documentation.
|
|
149
|
-
|
|
150
|
-
DEPRECATION NOTICE: ProvisioningFunctions.get_director()
|
|
151
|
-
will be removed in PyU4V version 10.2 in favour of
|
|
152
|
-
SystemFunctions.get_director_port_list(). For further
|
|
153
|
-
information please consult PyU4V 10.0 release notes.
|
|
154
|
-
|
|
155
|
-
For V4 you must use SystemFunctions.get_director_port_list()
|
|
156
|
-
|
|
157
|
-
:param director: the director ID e.g. FA-1D -- str
|
|
158
|
-
:param filters: optional filters - dict
|
|
159
|
-
:returns: port key dicts -- list
|
|
160
|
-
"""
|
|
161
|
-
response = self.get_resource(
|
|
162
|
-
category=SYSTEM,
|
|
163
|
-
resource_level=SYMMETRIX, resource_level_id=self.array_id,
|
|
164
|
-
resource_type=DIRECTOR, resource_type_id=director,
|
|
165
|
-
resource=PORT, params=filters)
|
|
166
|
-
port_key_list = (
|
|
167
|
-
response.get('symmetrixPortKey', list()) if response else list())
|
|
168
|
-
return port_key_list
|
|
169
|
-
|
|
170
|
-
@decorators.refactoring_notice(
|
|
171
|
-
'SystemFunctions', 'get_port_identifier', 10.0, 10.2)
|
|
172
|
-
def get_port_identifier(self, director, port_no):
|
|
173
|
-
"""Get the identifier (wwn) of the physical port.
|
|
174
|
-
|
|
175
|
-
DEPRECATION NOTICE: ProvisioningFunctions.get_director()
|
|
176
|
-
will be removed in PyU4V version 10.2 in favour of
|
|
177
|
-
SystemFunctions.get_port_identifier(). For further
|
|
178
|
-
information please consult PyU4V 10.0 release notes.
|
|
179
|
-
|
|
180
|
-
For V4 you must use SystemFunctions.get_port_identifier()
|
|
181
|
-
|
|
182
|
-
:param director: the id of the director -- str
|
|
183
|
-
:param port_no: the number of the port -- str
|
|
184
|
-
:returns: wwn (FC) or iqn (iscsi) -- str or None
|
|
185
|
-
"""
|
|
186
|
-
wwn = None
|
|
187
|
-
port_info = self.get_director_port(director, port_no)
|
|
188
|
-
if port_info:
|
|
189
|
-
try:
|
|
190
|
-
wwn = port_info['symmetrixPort']['identifier']
|
|
191
|
-
except KeyError:
|
|
192
|
-
LOG.error('Cannot retrieve port information.')
|
|
193
|
-
return wwn
|
|
194
|
-
|
|
195
82
|
def get_host(self, host_id):
|
|
196
83
|
"""Get details on a host on the array.
|
|
197
84
|
|
|
@@ -797,106 +684,6 @@ class ProvisioningFunctions(object):
|
|
|
797
684
|
port_list.append(port)
|
|
798
685
|
return port_list
|
|
799
686
|
|
|
800
|
-
@decorators.refactoring_notice(
|
|
801
|
-
'SystemFunctions', 'get_target_wwns_from_port_group', 10.0, 10.2)
|
|
802
|
-
def get_target_wwns_from_port_group(self, port_group_id):
|
|
803
|
-
"""Get the director ports' WWNs.
|
|
804
|
-
|
|
805
|
-
DEPRECATION NOTICE:
|
|
806
|
-
ProvisioningFunctions.get_target_wwns_from_port_group()
|
|
807
|
-
will be removed in PyU4V version 10.2 in favour of
|
|
808
|
-
SystemFunctions.get_target_wwns_from_port_group(). For further
|
|
809
|
-
information please consult PyU4V 10.0 release notes.
|
|
810
|
-
|
|
811
|
-
For V4 you must use SystemFunctions.get_target_wwns_from_port_group()
|
|
812
|
-
|
|
813
|
-
:param port_group_id: the name of the port group -- str
|
|
814
|
-
:returns: target_wwns -- target wwns for the port group -- list
|
|
815
|
-
"""
|
|
816
|
-
target_wwns = list()
|
|
817
|
-
port_group_details = self.get_port_group(port_group_id)
|
|
818
|
-
dir_port_list = port_group_details['symmetrixPortKey']
|
|
819
|
-
for dir_port in dir_port_list:
|
|
820
|
-
dir_id = dir_port['directorId']
|
|
821
|
-
port_no = dir_port['portId']
|
|
822
|
-
wwn = self.get_port_identifier(dir_id, port_no)
|
|
823
|
-
target_wwns.append(wwn)
|
|
824
|
-
return target_wwns
|
|
825
|
-
|
|
826
|
-
@decorators.refactoring_notice(
|
|
827
|
-
'SystemFunctions', 'get_iscsi_ip_address_and_iqn', 10.0, 10.2)
|
|
828
|
-
def get_iscsi_ip_address_and_iqn(self, port_id):
|
|
829
|
-
"""Get the ip addresses from the director port.
|
|
830
|
-
|
|
831
|
-
DEPRECATION NOTICE:
|
|
832
|
-
ProvisioningFunctions.get_iscsi_ip_address_and_iqn()
|
|
833
|
-
will be removed in PyU4V version 10.2 in favour of
|
|
834
|
-
SystemFunctions.get_iscsi_ip_address_and_iqn(). For further
|
|
835
|
-
information please consult PyU4V 10.0 release notes.
|
|
836
|
-
|
|
837
|
-
For V4 you must use SystemFunctions.get_iscsi_ip_address_and_iqn()
|
|
838
|
-
|
|
839
|
-
:param port_id: director port identifier -- str
|
|
840
|
-
:returns: ip addresses, iqn -- list, str
|
|
841
|
-
"""
|
|
842
|
-
ip_addresses, iqn = list(), None
|
|
843
|
-
dir_id = port_id.split(':')[0]
|
|
844
|
-
port_no = port_id.split(':')[1]
|
|
845
|
-
port_details = self.get_director_port(dir_id, port_no)
|
|
846
|
-
if port_details:
|
|
847
|
-
try:
|
|
848
|
-
ip_addresses = port_details['symmetrixPort']['ip_addresses']
|
|
849
|
-
iqn = port_details['symmetrixPort']['identifier']
|
|
850
|
-
except (KeyError, TypeError):
|
|
851
|
-
LOG.info('Could not get IP address from director port')
|
|
852
|
-
return ip_addresses, iqn
|
|
853
|
-
|
|
854
|
-
@decorators.refactoring_notice(
|
|
855
|
-
'ProvisioningFunctions', 'create_new_port_group', 10.0, 10.2)
|
|
856
|
-
def create_port_group(self, port_group_id, director_id, port_id,
|
|
857
|
-
port_group_protocol=None):
|
|
858
|
-
"""Create a new port group.
|
|
859
|
-
|
|
860
|
-
DEPRECATION NOTICE: ProvisioningFunctions.create_port_group()
|
|
861
|
-
will be removed in PyU4V version 10.2 in favour of
|
|
862
|
-
ProvisioningFunctions.create_new_port_group(). For further
|
|
863
|
-
information please consult PyU4V 10.0 release notes.
|
|
864
|
-
|
|
865
|
-
:param port_group_id: name of the new port group - str
|
|
866
|
-
:param director_id: director id -- str
|
|
867
|
-
:param port_id: port id -- str
|
|
868
|
-
:param port_group_protocol: required for V4 only.
|
|
869
|
-
one of [SCSI_FC, iSCSI, NVMe_TCP] -- str
|
|
870
|
-
|
|
871
|
-
:returns: new port group details -- dict
|
|
872
|
-
"""
|
|
873
|
-
dir_port_list = [{'directorId': director_id,
|
|
874
|
-
'portId': port_id}]
|
|
875
|
-
return self.create_new_port_group(
|
|
876
|
-
port_group_id, dir_port_list, port_group_protocol)
|
|
877
|
-
|
|
878
|
-
@decorators.refactoring_notice(
|
|
879
|
-
'ProvisioningFunctions', 'create_new_port_group', 10.0, 10.2)
|
|
880
|
-
def create_multiport_port_group(self, port_group_id, ports,
|
|
881
|
-
port_group_protocol=None):
|
|
882
|
-
"""Create a new port group.
|
|
883
|
-
|
|
884
|
-
DEPRECATION NOTICE:
|
|
885
|
-
ProvisioningFunctions.create_multiport_port_group()
|
|
886
|
-
will be removed in PyU4V version 10.2 in favour of
|
|
887
|
-
ProvisioningFunctions.create_new_port_group(). For further
|
|
888
|
-
information please consult PyU4V 10.0 release notes.
|
|
889
|
-
|
|
890
|
-
:param port_group_id: name of the new port group -- str
|
|
891
|
-
:param ports: port dicts Example:
|
|
892
|
-
[{'directorId': director_id, 'portId': port_id}] -- list
|
|
893
|
-
:param port_group_protocol: required for V4 only.
|
|
894
|
-
one of [SCSI_FC, iSCSI, NVMe_TCP] -- str
|
|
895
|
-
:returns: new port group details -- dict
|
|
896
|
-
"""
|
|
897
|
-
return self.create_new_port_group(
|
|
898
|
-
port_group_id, ports, port_group_protocol)
|
|
899
|
-
|
|
900
687
|
def create_empty_port_group(
|
|
901
688
|
self, port_group_id, port_group_protocol=None, _async=None):
|
|
902
689
|
"""Create an empty port group.
|
|
@@ -1918,7 +1705,12 @@ class ProvisioningFunctions(object):
|
|
|
1918
1705
|
:param device_id: device id -- str
|
|
1919
1706
|
:param payload: request payload e.g. {"editVolumeActionParam": {
|
|
1920
1707
|
"enable_mobility_id_param": {
|
|
1921
|
-
"enable_mobility_id": "true"}}}
|
|
1708
|
+
"enable_mobility_id": "true"}}}
|
|
1709
|
+
or
|
|
1710
|
+
{
|
|
1711
|
+
"editVolumeActionParam": {
|
|
1712
|
+
"reset_wwn_param": {
|
|
1713
|
+
"reset_wwn": "true"}}} -- dict
|
|
1922
1714
|
:returns: volume details -- dict
|
|
1923
1715
|
"""
|
|
1924
1716
|
return self.modify_resource(
|
|
@@ -1974,6 +1766,29 @@ class ProvisioningFunctions(object):
|
|
|
1974
1766
|
'volumeIdentifier': vol_identifier_dict}}})
|
|
1975
1767
|
return self._modify_volume(device_id, rename_vol_payload)
|
|
1976
1768
|
|
|
1769
|
+
def reset_volume_wwn(self, device_id, array_id=None):
|
|
1770
|
+
"""reset volume wwn to remove external identify set by non
|
|
1771
|
+
disruptive migration.
|
|
1772
|
+
|
|
1773
|
+
:param device_id: 5 digit device id -- int
|
|
1774
|
+
:param array_id: 16 digit array id -- int
|
|
1775
|
+
|
|
1776
|
+
"""
|
|
1777
|
+
array_id = array_id if array_id else self.array_id
|
|
1778
|
+
payload = {
|
|
1779
|
+
"editVolumeActionParam": {
|
|
1780
|
+
"reset_wwn_param": {
|
|
1781
|
+
"reset_wwn": "true"
|
|
1782
|
+
}}}
|
|
1783
|
+
try:
|
|
1784
|
+
return self.common.modify_resource(
|
|
1785
|
+
target_uri=f"/{self.version}/sloprovisioning/"
|
|
1786
|
+
f"symmetrix/{array_id}/volume/{device_id}",
|
|
1787
|
+
resource_type=None, payload=payload)
|
|
1788
|
+
except Exception as e:
|
|
1789
|
+
error_message = f"Failed to reset volume WWN: {str(e)}"
|
|
1790
|
+
raise Exception(error_message)
|
|
1791
|
+
|
|
1977
1792
|
def deallocate_volume(self, device_id):
|
|
1978
1793
|
"""Deallocate all tracks on a volume.
|
|
1979
1794
|
|
|
@@ -2100,25 +1915,6 @@ class ProvisioningFunctions(object):
|
|
|
2100
1915
|
break
|
|
2101
1916
|
return selected_masking_view, active_connections
|
|
2102
1917
|
|
|
2103
|
-
@decorators.refactoring_notice(
|
|
2104
|
-
'SystemFunctions', 'get_fa_directors', 10.0, 10.2)
|
|
2105
|
-
def get_fa_directors(self):
|
|
2106
|
-
"""Get all FA directors on the array.
|
|
2107
|
-
|
|
2108
|
-
DEPRECATION NOTICE: ProvisioningFunctions.get_fa_directors()
|
|
2109
|
-
will be removed in PyU4V version 10.2 in favour of
|
|
2110
|
-
SystemFunctions.get_fa_directors(). For further
|
|
2111
|
-
information please consult PyU4V 10.0 release notes.
|
|
2112
|
-
|
|
2113
|
-
:returns: fa director strings -- list
|
|
2114
|
-
"""
|
|
2115
|
-
directors = self.get_director_list()
|
|
2116
|
-
fa_directors = set()
|
|
2117
|
-
for director in directors:
|
|
2118
|
-
if 'FA-' in director:
|
|
2119
|
-
fa_directors.add(director)
|
|
2120
|
-
return list(fa_directors)
|
|
2121
|
-
|
|
2122
1918
|
def get_available_initiator_list(self, director_type=None):
|
|
2123
1919
|
"""Get list of available initiators.
|
|
2124
1920
|
|
|
@@ -119,10 +119,14 @@ class RealTimeFunctions(object):
|
|
|
119
119
|
"""
|
|
120
120
|
array_id = self.array_id if not array_id else array_id
|
|
121
121
|
request_params = {pc.SYMM_ID: array_id, pc.CATEGORY: category}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
122
|
+
try:
|
|
123
|
+
response = self.post_request(
|
|
124
|
+
no_version=True, category=pc.PERFORMANCE,
|
|
125
|
+
resource_level=pc.REAL_TIME, resource_type=pc.KEYS,
|
|
126
|
+
payload=request_params)
|
|
127
|
+
except Exception as e:
|
|
128
|
+
logging.error(f"Error in get_category_keys: {e}")
|
|
129
|
+
return list()
|
|
126
130
|
return response.get(pc.KEYS, list()) if response else list()
|
|
127
131
|
|
|
128
132
|
def _validate_real_time_input(
|
|
@@ -410,7 +414,7 @@ class RealTimeFunctions(object):
|
|
|
410
414
|
:param end_date: timestamp in milliseconds since epoch -- int
|
|
411
415
|
:param metrics: performance metrics, options are individual metrics,
|
|
412
416
|
a list of metrics, or 'ALL' for all metrics -- str/list
|
|
413
|
-
:param instance_id:
|
|
417
|
+
:param instance_id: frontend director id -- str
|
|
414
418
|
:param array_id: array serial number -- str
|
|
415
419
|
:returns: real-time performance data -- dict
|
|
416
420
|
"""
|
|
@@ -442,7 +446,7 @@ class RealTimeFunctions(object):
|
|
|
442
446
|
:param end_date: timestamp in milliseconds since epoch -- int
|
|
443
447
|
:param metrics: performance metrics, options are individual metrics,
|
|
444
448
|
a list of metrics, or 'ALL' for all metrics -- str/list
|
|
445
|
-
:param instance_id:
|
|
449
|
+
:param instance_id: frontend dir/port id -- str
|
|
446
450
|
:param array_id: array serial number -- str
|
|
447
451
|
:returns: real-time performance data -- dict
|
|
448
452
|
"""
|
|
@@ -187,7 +187,7 @@ class ReplicationFunctions(object):
|
|
|
187
187
|
|
|
188
188
|
def create_storage_group_snapshot(
|
|
189
189
|
self, storage_group_id, snap_name, ttl=None, hours=False,
|
|
190
|
-
secure=False):
|
|
190
|
+
secure=False, bothsides=False):
|
|
191
191
|
"""Create a snapVx snapshot of a storage group.
|
|
192
192
|
|
|
193
193
|
To establish a new generation of an existing SnapVX snapshot for a
|
|
@@ -200,6 +200,7 @@ class ReplicationFunctions(object):
|
|
|
200
200
|
:param hours: if TTL is in hours instead of days -- bool
|
|
201
201
|
:param secure: sets secure snapshot, snapshot created with secure
|
|
202
202
|
option can not be deleted before ttl expires -- bool
|
|
203
|
+
:param bothsides: if both sides should be snapshotted -- bool
|
|
203
204
|
:returns: snapshot details -- dict
|
|
204
205
|
"""
|
|
205
206
|
payload = {'snapshotName': snap_name}
|
|
@@ -210,6 +211,8 @@ class ReplicationFunctions(object):
|
|
|
210
211
|
payload.update({'timeToLive': ttl})
|
|
211
212
|
if hours:
|
|
212
213
|
payload.update({'timeInHours': 'True'})
|
|
214
|
+
if bothsides:
|
|
215
|
+
payload.update({'bothSides': 'True'})
|
|
213
216
|
return self.create_resource(
|
|
214
217
|
category=REPLICATION,
|
|
215
218
|
resource_level=SYMMETRIX, resource_level_id=self.array_id,
|
|
@@ -1223,9 +1223,9 @@ class SystemFunctions(object):
|
|
|
1223
1223
|
|
|
1224
1224
|
:param director: Director Id e.g. OR-1C -- str
|
|
1225
1225
|
:param port_number: Director Port Number -- int
|
|
1226
|
-
:param protocol:
|
|
1227
|
-
:param enable:
|
|
1228
|
-
:param array_id:
|
|
1226
|
+
:param protocol: NVMe_TCP,SCSI_FC,NVMe_FC,RDF_FC,iSCSI,RDF_GigE -- str
|
|
1227
|
+
:param enable: --bool
|
|
1228
|
+
:param array_id: 12 digit Array ID--str
|
|
1229
1229
|
:return:
|
|
1230
1230
|
"""
|
|
1231
1231
|
|
|
@@ -1360,3 +1360,65 @@ class SystemFunctions(object):
|
|
|
1360
1360
|
return self.common.modify_resource(
|
|
1361
1361
|
target_uri=f"/{self.version}/system/snmp/{snmp_id}",
|
|
1362
1362
|
resource_type=None, payload=payload)
|
|
1363
|
+
|
|
1364
|
+
def get_ldap_configuration(self):
|
|
1365
|
+
"""Get Current LDAP configuration for Unisphere Server.
|
|
1366
|
+
|
|
1367
|
+
:returns: dict
|
|
1368
|
+
"""
|
|
1369
|
+
return self.common.get_request(
|
|
1370
|
+
target_uri=f"/{self.version}/system/authorization/ldap",
|
|
1371
|
+
resource_type=None)
|
|
1372
|
+
|
|
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,
|
|
1376
|
+
group_object_class, ssl_certificate,
|
|
1377
|
+
limit_authentication_to_ldap_group_members, ldap_group_names=None):
|
|
1378
|
+
"""Enable or disable LDAP authentication.
|
|
1379
|
+
:param action: Enable or Disable, Enable requires additional payload
|
|
1380
|
+
parameters -- Bool
|
|
1381
|
+
:param ldap_server: LDAP Server IP address or DNS Name --str
|
|
1382
|
+
:param ldap_port: TCP port number --int
|
|
1383
|
+
:param bind_dn: Distinguished name of the privileged account used to
|
|
1384
|
+
perform operations, such as searching users and
|
|
1385
|
+
groups, on the LDAP directory --str
|
|
1386
|
+
:param bind_password: Password of the privileged account --str
|
|
1387
|
+
:param user_search_path: name of the node at which to begin user
|
|
1388
|
+
searches --str
|
|
1389
|
+
:param group_name_attribute: --str
|
|
1390
|
+
:param group_member_attribute: --str
|
|
1391
|
+
:param group_object_class: --str
|
|
1392
|
+
:param ssl_certificate -- base64 encoded SSL certificate, obtained
|
|
1393
|
+
from server or contents of .cer file
|
|
1394
|
+
All text in file required including begin
|
|
1395
|
+
and end markers for file
|
|
1396
|
+
-----BEGIN CERTIFICATE----- to
|
|
1397
|
+
-----END CERTIFICATE----- --str
|
|
1398
|
+
:param limit_authentication_to_ldap_group_members --bool
|
|
1399
|
+
:param ldap_group_names: LDAP groups separated by commas --str
|
|
1400
|
+
:returns: dict
|
|
1401
|
+
"""
|
|
1402
|
+
|
|
1403
|
+
payload = {"action": action}
|
|
1404
|
+
if action:
|
|
1405
|
+
payload["enable_ldap_authority"] = {
|
|
1406
|
+
"server": ldap_server,
|
|
1407
|
+
"port": ldap_port,
|
|
1408
|
+
"bind_dn": bind_dn,
|
|
1409
|
+
"bind_password": bind_password,
|
|
1410
|
+
"user_search_path": user_search_path,
|
|
1411
|
+
"user_object_class": user_object_class,
|
|
1412
|
+
"user_id_attribute": user_id_attribute,
|
|
1413
|
+
"group_search_path": user_search_path,
|
|
1414
|
+
"group_name_attribute": group_name_attribute,
|
|
1415
|
+
"group_member_attribute": group_member_attribute,
|
|
1416
|
+
"group_object_class": group_object_class,
|
|
1417
|
+
"ssl_certificate": ssl_certificate,
|
|
1418
|
+
"limit_authentication_to_ldap_group_members":
|
|
1419
|
+
limit_authentication_to_ldap_group_members,
|
|
1420
|
+
"ldap_group_names": ldap_group_names
|
|
1421
|
+
}
|
|
1422
|
+
return self.common.modify_resource(
|
|
1423
|
+
target_uri=f"/{self.version}/system/authorization/ldap",
|
|
1424
|
+
resource_type=None, payload=payload)
|
|
@@ -15,7 +15,7 @@ def generate_get_functions(category, api_connection, api_version):
|
|
|
15
15
|
returns: whole bunch of functions in a file eventually.
|
|
16
16
|
"""
|
|
17
17
|
for uri_link in keys:
|
|
18
|
-
if f'
|
|
18
|
+
if f'102/{category}' in uri_link:
|
|
19
19
|
if 'get' in data.get(f'{uri_link}').keys():
|
|
20
20
|
uri_detail = data.get(f'{uri_link}')
|
|
21
21
|
function_name = (
|
|
@@ -81,4 +81,4 @@ def generate_get_functions(category, api_connection, api_version):
|
|
|
81
81
|
|
|
82
82
|
|
|
83
83
|
generate_get_functions(category='replication', api_connection='self',
|
|
84
|
-
api_version='
|
|
84
|
+
api_version='102')
|
|
@@ -189,7 +189,7 @@ class U4VConn(object):
|
|
|
189
189
|
uni_ver, major_ver = self.common.get_uni_version()
|
|
190
190
|
if int(major_ver) < int(constants.UNISPHERE_VERSION):
|
|
191
191
|
msg = ('Unisphere version {uv} does not meet the minimum '
|
|
192
|
-
'requirement of v10.
|
|
192
|
+
'requirement of v10.2.x Please upgrade your version of '
|
|
193
193
|
'Unisphere to use this SDK. Exiting...'.format(uv=uni_ver))
|
|
194
194
|
sys.exit(msg)
|
|
195
195
|
else:
|
|
@@ -39,8 +39,8 @@ APP_OCT = 'application/octet-stream'
|
|
|
39
39
|
APP_MPART = 'multipart/form-data'
|
|
40
40
|
|
|
41
41
|
# Unisphere REST URI constants
|
|
42
|
-
PYU4V_VERSION = '10.
|
|
43
|
-
UNISPHERE_VERSION = '
|
|
42
|
+
PYU4V_VERSION = '10.2.0.0'
|
|
43
|
+
UNISPHERE_VERSION = '102'
|
|
44
44
|
ENHANCED_API_VERSION = 'v1'
|
|
45
45
|
UCODE_6079 = '6079'
|
|
46
46
|
VERSION = 'version'
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PyU4V
|
|
3
|
-
Version: 10.
|
|
3
|
+
Version: 10.2.0.0
|
|
4
4
|
Summary: A Python library for use with Dell EMC's Unisphere for PowerMax REST API.
|
|
5
5
|
Home-page: https://github.com/dell/PyU4V/
|
|
6
6
|
Author: Dell Inc. or its subsidiaries
|
|
7
|
-
Author-email:
|
|
7
|
+
Author-email: paule.martin@dell.com
|
|
8
8
|
License: Apache 2.0
|
|
9
9
|
Platform: UNKNOWN
|
|
10
10
|
Classifier: Development Status :: 5 - Production/Stable
|
|
@@ -23,7 +23,7 @@ Requires-Python: >=3.6, <4.0
|
|
|
23
23
|
Description-Content-Type: text/x-rst
|
|
24
24
|
License-File: LICENSE
|
|
25
25
|
|
|
26
|
-
Welcome to PyU4V 10.
|
|
26
|
+
Welcome to PyU4V 10.2
|
|
27
27
|
=====================
|
|
28
28
|
|
|
29
29
|
| |Maintenance| |OpenSource| |AskUs| |License| |Test| |Build| |Docs|
|
|
@@ -51,9 +51,9 @@ PyU4V Version 10.1
|
|
|
51
51
|
+-------------------------------+----------------------------+
|
|
52
52
|
| **Author** | Dell EMC |
|
|
53
53
|
+-------------------------------+----------------------------+
|
|
54
|
-
| **PyU4V Version** | 10.
|
|
54
|
+
| **PyU4V Version** | 10.2.0.0 |
|
|
55
55
|
+-------------------------------+----------------------------+
|
|
56
|
-
| **Minimum Unisphere Version** | 10.
|
|
56
|
+
| **Minimum Unisphere Version** | 10.2.0.0 |
|
|
57
57
|
+-------------------------------+----------------------------+
|
|
58
58
|
| **Array Model** | VMAX-3, VMAX AFA, PowerMax |
|
|
59
59
|
+-------------------------------+----------------------------+
|
|
@@ -99,7 +99,7 @@ specifying ``PyU4V`` as the install package for ``pip``::
|
|
|
99
99
|
|
|
100
100
|
$ pip install PyU4V
|
|
101
101
|
# Install a specific version
|
|
102
|
-
$ pip install PyU4V==10.
|
|
102
|
+
$ pip install PyU4V==10.2.0.0
|
|
103
103
|
|
|
104
104
|
Copy the sample ``PyU4V.conf`` provided with PyU4V to either your working
|
|
105
105
|
directory or within a directory named ``.PyU4V`` in your current users home
|
|
@@ -188,7 +188,7 @@ outlined in the previous section).
|
|
|
188
188
|
|
|
189
189
|
conn = PyU4V.U4VConn()
|
|
190
190
|
conn.common.get_unisphere_version()
|
|
191
|
-
>> {'version': 'V10.
|
|
191
|
+
>> {'version': 'V10.2.0.0'}
|
|
192
192
|
|
|
193
193
|
If you wish to query another array without changing the configuration file,
|
|
194
194
|
call the connection ``set_array_id()`` function:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Welcome to PyU4V 10.
|
|
1
|
+
Welcome to PyU4V 10.2
|
|
2
2
|
=====================
|
|
3
3
|
|
|
4
4
|
| |Maintenance| |OpenSource| |AskUs| |License| |Test| |Build| |Docs|
|
|
@@ -26,9 +26,9 @@ PyU4V Version 10.1
|
|
|
26
26
|
+-------------------------------+----------------------------+
|
|
27
27
|
| **Author** | Dell EMC |
|
|
28
28
|
+-------------------------------+----------------------------+
|
|
29
|
-
| **PyU4V Version** | 10.
|
|
29
|
+
| **PyU4V Version** | 10.2.0.0 |
|
|
30
30
|
+-------------------------------+----------------------------+
|
|
31
|
-
| **Minimum Unisphere Version** | 10.
|
|
31
|
+
| **Minimum Unisphere Version** | 10.2.0.0 |
|
|
32
32
|
+-------------------------------+----------------------------+
|
|
33
33
|
| **Array Model** | VMAX-3, VMAX AFA, PowerMax |
|
|
34
34
|
+-------------------------------+----------------------------+
|
|
@@ -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.
|
|
77
|
+
$ pip install PyU4V==10.2.0.0
|
|
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': 'V10.
|
|
166
|
+
>> {'version': 'V10.2.0.0'}
|
|
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:
|
|
@@ -19,18 +19,17 @@ with open("README.rst", "r") as fh:
|
|
|
19
19
|
|
|
20
20
|
setuptools.setup(
|
|
21
21
|
name='PyU4V',
|
|
22
|
-
version='10.
|
|
22
|
+
version='10.2.0.0',
|
|
23
23
|
url='https://github.com/dell/PyU4V/',
|
|
24
24
|
author='Dell Inc. or its subsidiaries',
|
|
25
|
-
author_email='
|
|
25
|
+
author_email='paule.martin@dell.com',
|
|
26
26
|
description="A Python library for use with Dell EMC's Unisphere for "
|
|
27
27
|
"PowerMax REST API.",
|
|
28
28
|
long_description=long_description,
|
|
29
29
|
long_description_content_type="text/x-rst",
|
|
30
30
|
license='Apache 2.0',
|
|
31
31
|
packages=setuptools.find_packages(),
|
|
32
|
-
install_requires=['requests', 'six', 'urllib3', 'prettytable',
|
|
33
|
-
'sphinx_rtd_theme'],
|
|
32
|
+
install_requires=['requests', 'six', 'urllib3', 'prettytable'],
|
|
34
33
|
include_package_data=True,
|
|
35
34
|
classifiers=[
|
|
36
35
|
'Development Status :: 5 - Production/Stable',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|