PyU4V 10.2.0.3__tar.gz → 10.3.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.
Files changed (51) hide show
  1. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PKG-INFO +8 -9
  2. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/__init__.py +3 -2
  3. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/common.py +4 -1
  4. pyu4v-10.3.0.0/PyU4V/enhanced_api.py +112 -0
  5. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/metro_dr.py +11 -12
  6. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/performance.py +26 -12
  7. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/performance_enhanced.py +19 -2
  8. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/replication.py +13 -5
  9. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/rest_requests.py +2 -11
  10. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/scripts/replace_version.py +1 -0
  11. pyu4v-10.3.0.0/PyU4V/settings.py +733 -0
  12. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/system.py +18 -0
  13. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/tools/generate_functions.py +5 -4
  14. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/univmax_conn.py +5 -0
  15. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/utils/constants.py +4 -4
  16. pyu4v-10.3.0.0/PyU4V/version.py +6 -0
  17. pyu4v-10.3.0.0/PyU4V/workload_planner.py +42 -0
  18. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/README.rst +7 -8
  19. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/pyu4v.egg-info/PKG-INFO +8 -9
  20. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/pyu4v.egg-info/SOURCES.txt +2 -0
  21. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/setup.py +1 -1
  22. pyu4v-10.2.0.3/PyU4V/version.py +0 -6
  23. pyu4v-10.2.0.3/PyU4V/workload_planner.py +0 -102
  24. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/LICENSE +0 -0
  25. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/clone.py +0 -0
  26. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/migration.py +0 -0
  27. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/provisioning.py +0 -0
  28. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/real_time.py +0 -0
  29. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/scripts/__init__.py +0 -0
  30. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/serviceability.py +0 -0
  31. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/snapshot_policy.py +0 -0
  32. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/storage_groups.py +0 -0
  33. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/tools/__init__.py +0 -0
  34. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/tools/openstack/__init__.py +0 -0
  35. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/tools/openstack/migrate.py +0 -0
  36. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/tools/openstack/migrate_utils.py +0 -0
  37. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/utils/__init__.py +0 -0
  38. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/utils/config_handler.py +0 -0
  39. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/utils/console.py +0 -0
  40. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/utils/decorators.py +0 -0
  41. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/utils/exception.py +0 -0
  42. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/utils/file_handler.py +0 -0
  43. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/utils/performance_category_map.py +0 -0
  44. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/utils/performance_constants.py +0 -0
  45. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/utils/time_handler.py +0 -0
  46. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/utils/utils.py +0 -0
  47. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/PyU4V/volumes.py +0 -0
  48. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/pyu4v.egg-info/dependency_links.txt +0 -0
  49. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/pyu4v.egg-info/requires.txt +0 -0
  50. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/pyu4v.egg-info/top_level.txt +0 -0
  51. {pyu4v-10.2.0.3 → pyu4v-10.3.0.0}/setup.cfg +0 -0
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyu4v
3
- Version: 10.2.0.3
3
+ Version: 10.3.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
7
  Author-email: paule.martin@dell.com
8
8
  License: Apache 2.0
9
- Description: Welcome to PyU4V 10.2
9
+ Description: Welcome to PyU4V 10.3
10
10
  =====================
11
11
 
12
12
  | |Maintenance| |OpenSource| |AskUs| |License| |Test| |Build| |Docs|
@@ -28,15 +28,15 @@ Description: Welcome to PyU4V 10.2
28
28
  where ``{ip-address}`` is the IP address of your Unisphere server and
29
29
  ``{port}`` is the port it is listening on.
30
30
 
31
- PyU4V Version 10.2
31
+ PyU4V Version 10.3
32
32
  ------------------
33
33
 
34
34
  +-------------------------------+----------------------------+
35
35
  | **Author** | Dell EMC |
36
36
  +-------------------------------+----------------------------+
37
- | **PyU4V Version** | 10.2.0.3 |
37
+ | **PyU4V Version** | 10.3.0.0 |
38
38
  +-------------------------------+----------------------------+
39
- | **Minimum Unisphere Version** | 10.2.0.0 |
39
+ | **Minimum Unisphere Version** | 10.3.0 |
40
40
  +-------------------------------+----------------------------+
41
41
  | **Array Model** | VMAX-3, VMAX AFA, PowerMax |
42
42
  +-------------------------------+----------------------------+
@@ -55,7 +55,7 @@ Description: Welcome to PyU4V 10.2
55
55
  version of Unisphere older than 9.1.x
56
56
 
57
57
  Note
58
- PyU4V version 10.x is compatible with scripts written for PyU4V versions
58
+ PyU4V version 10.3 is compatible with scripts written for PyU4V versions
59
59
  >= 9.2. Please ensure to check change log to ensure that you are not
60
60
  using functions that have been marked as depreciated.
61
61
 
@@ -82,7 +82,7 @@ Description: Welcome to PyU4V 10.2
82
82
 
83
83
  $ pip install PyU4V
84
84
  # Install a specific version
85
- $ pip install PyU4V==10.2.0.0
85
+ $ pip install PyU4V==10.2.0.1
86
86
 
87
87
  Copy the sample ``PyU4V.conf`` provided with PyU4V to either your working
88
88
  directory or within a directory named ``.PyU4V`` in your current users home
@@ -171,7 +171,7 @@ Description: Welcome to PyU4V 10.2
171
171
 
172
172
  conn = PyU4V.U4VConn()
173
173
  conn.common.get_unisphere_version()
174
- >> {'version': 'V10.2.0.0'}
174
+ >> {'version': '10.3.0.0'}
175
175
 
176
176
  If you wish to query another array without changing the configuration file,
177
177
  call the connection ``set_array_id()`` function:
@@ -266,7 +266,6 @@ Description: Welcome to PyU4V 10.2
266
266
  .. _GitHub-Issues: https://github.com/dell/PyU4V/issues
267
267
  .. _StackOverFlow: https://stackoverflow.com/search?q=PyU4V
268
268
 
269
-
270
269
  Platform: UNKNOWN
271
270
  Classifier: Development Status :: 5 - Production/Stable
272
271
  Classifier: Intended Audience :: Developers
@@ -22,8 +22,9 @@
22
22
 
23
23
  from .univmax_conn import U4VConn # noqa: F401
24
24
  from . import version
25
+
25
26
  __title__ = 'pyu4v'
26
27
  __version__ = version.VERSION
27
- __author__ = 'Dell EMC or its subsidiaries'
28
+ __author__ = 'Dell Technologies'
28
29
  __license__ = 'Apache 2.0'
29
- __copyright__ = 'Copyright 2023 Dell EMC Inc'
30
+ __copyright__ = 'Copyright 2025 Dell Technologies'
@@ -166,6 +166,10 @@ class CommonFunctions(object):
166
166
  :param message: server response -- str
167
167
  :raises: VolumeBackendAPIException
168
168
  """
169
+ if status_code == None:
170
+ raise exception.VolumeBackendAPIException(
171
+ data="Server unavailable or IP incorrect")
172
+
169
173
  if status_code not in [STATUS_200, STATUS_201,
170
174
  STATUS_202, STATUS_204]:
171
175
  exception_message = (
@@ -176,7 +180,6 @@ class CommonFunctions(object):
176
180
  data=exception_message)
177
181
  if status_code == STATUS_401:
178
182
  raise exception.UnauthorizedRequestException()
179
-
180
183
  raise exception.VolumeBackendAPIException(
181
184
  data=exception_message)
182
185
 
@@ -0,0 +1,112 @@
1
+ # Copyright (c) 2023 Dell Inc. or its subsidiaries.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ """enhanced_api.py."""
15
+
16
+ import logging
17
+
18
+ from PyU4V.common import CommonFunctions
19
+ from PyU4V.utils import constants
20
+
21
+ LOG = logging.getLogger(__name__)
22
+
23
+
24
+ class EnhancedAPIFunctions(object):
25
+ """Enhanced Functions for retrieving data about provisioned storage
26
+ objects."""
27
+
28
+ def __init__(self, array_id, rest_client):
29
+ """__init__."""
30
+ self.common = CommonFunctions(rest_client)
31
+ self.get_resource = self.common.get_resource
32
+ self.array_id = array_id
33
+ self.enhanced_api_version = constants.ENHANCED_API_VERSION
34
+
35
+ def get_storage_object_meta_data(self, storage_object):
36
+ """Get details on available metadata for storage objects of the
37
+ specified type.
38
+
39
+ :param: storage_object, the storage object to get metadata for,
40
+ valid values are directors, hosts, initiators,
41
+ ip-interfaces, ip-routes, masking-views, port-groups, ports,
42
+ rdf-groups, storage-groups, volumes -- string
43
+ :returns: dictionary with list of attributes and descriptions of
44
+ attribute types used for filtering and selection -- dict
45
+ """
46
+ response = self.common.get_request(
47
+ target_uri=f"/{self.enhanced_api_version}/systems"
48
+ f"/{storage_object}/metadata",
49
+ resource_type=None)
50
+ return response
51
+
52
+ def get_storage_object_details(
53
+ self, storage_object, array_id=None, filters=None, select=None,
54
+ exclude=None):
55
+ """Get list of volumes from array with selected parameters.
56
+
57
+ :param: storage_object, the storage object to get metadata for,
58
+ valid values are directors, hosts, initiators,
59
+ ip-interfaces, ip-routes, masking-views, port-groups, ports,
60
+ rdf-groups, storage-groups, volumes -- string
61
+ :param array_id: The storage array ID -- string
62
+ :param filters: filter parameters, used to narrow down the result
63
+ list, filters can be any of the volume attributes,
64
+ and operators vary depending on type,
65
+ 'eq','ne','gt','ge','lt','le', equal, not equal,
66
+ greater than, greater than or equal, less than,
67
+ less than or equal, additional operators are
68
+ 'like','ilike' for string match, or case in-sensitive
69
+ string match, example
70
+ filters=['num_of_storage_groups eq 1',
71
+ 'identifier ilike findme'] -- list
72
+ :param select: selection of attributes to be in return, attributes
73
+ can be listed using get_volumes_meta_data function
74
+ If none selected base set of top level attributes are
75
+ returned, by default API will only return id,
76
+ to achieve this pass a list with empty string [''],
77
+ to extend the list of attributes returned to include
78
+ second level attributes you can pass along with list
79
+ from get_volumes_meta_data() e.g.
80
+ select=api.volumes.get_volumes_meta_data() +
81
+ ['snapshots.name'] -- list
82
+ :param exclude: list of attributes to exclude, by default rdf_infos
83
+ and snapshot details have been excluded as these can
84
+ extend the running of the API call, to override
85
+ simply pass an empty list or specify a list of
86
+ attribute names that you want to exclude from the
87
+ return, if values are passed in by select exclude is
88
+ ignored -- list
89
+ :returns: dict
90
+ """
91
+ array_id = array_id if array_id else self.array_id
92
+ if not exclude:
93
+ exclude = ['rdf_infos', 'snapshots']
94
+ if not select:
95
+ select = []
96
+ volume_metadata = self.get_storage_object_meta_data(
97
+ storage_object=storage_object)
98
+ for attribute in volume_metadata:
99
+ if attribute['name'] not in exclude:
100
+ select.append(attribute['name'])
101
+ select.append(attribute['name'])
102
+ select = ','.join(select)
103
+ if filters:
104
+ filters = '&filter=' + ','.join(filters)
105
+ else:
106
+ filters = ''
107
+ response = self.common.get_request(
108
+ target_uri=f"/{self.enhanced_api_version}/systems"
109
+ f"/{array_id}/{storage_object}"
110
+ f"?select={select}{filters}",
111
+ resource_type=None)
112
+ return response
@@ -112,14 +112,12 @@ class MetroDRFunctions(object):
112
112
  :param dr_storage_group_name: Name for Storage Group at DR,
113
113
  only used if group naming is required
114
114
  to be different from source - str
115
- :param force_new_metro_r1_dr_rdfg: whether or not to create a new RDFG
116
- to be created for Metro R1 array
117
- to DR array, or will autoselect
118
- from existing -- bool
119
- :param force_new_metro_r2_dr_rdfg: whether or not to create a new RDFG
120
- to be created for Metro R2 array
121
- to DR array, or will autoselect
122
- from existing -- bool
115
+ :param force_new_metro_r1_dr_rdfg: this parameter is ignored and
116
+ only present for backward
117
+ compatibility-- bool
118
+ :param force_new_metro_r2_dr_rdfg: this parameter is ignored and
119
+ only present for backward
120
+ compatibility-- bool
123
121
  :param _async: if call should be executed asynchronously or
124
122
  synchronously -- bool
125
123
  :returns: details of newly created metro dr environment-- dict
@@ -129,10 +127,11 @@ class MetroDRFunctions(object):
129
127
  if not metro_r2_storage_group_name:
130
128
  metro_r2_storage_group_name = storage_group_name
131
129
  if force_new_metro_r1_dr_rdfg or force_new_metro_r2_dr_rdfg:
132
- LOG.warning(
133
- "Parameter 'force_new_group' is no longer "
134
- "supported and will be ignored. Default behavior is to "
135
- "do this automatically")
130
+ LOG.warning(
131
+ "Parameter 'force_new__group' is no longer "
132
+ "supported and will be ignored. Default behavior is to "
133
+ "do this automatically")
134
+
136
135
  if dr_replication_mode:
137
136
  if 'ASYNCHRONOUS' in dr_replication_mode.upper():
138
137
  dr_replication_mode = ASYNCHRONOUS
@@ -892,6 +892,9 @@ class PerformanceFunctions(object):
892
892
  :param output_csv_path: filename for CSV to be generated -- str
893
893
  :param category: threshold specific category -- str
894
894
  """
895
+ LOG.warning("Warning: This function is deprecated and will be removed "
896
+ "in future version 10.4. Please explore API Calls in new "
897
+ "settings Category for getting and setting thresholds")
895
898
  category_list = (
896
899
  self.get_threshold_categories() if not category else [category])
897
900
  data_for_csv = list()
@@ -900,12 +903,11 @@ class PerformanceFunctions(object):
900
903
  for category in category_list:
901
904
  metric_setting = self.get_threshold_category_settings(category)
902
905
  threshold_settings = metric_setting.get(pc.PERF_THRESH)
903
- print(threshold_settings)
904
906
  for threshold in threshold_settings:
905
907
  data_for_csv.append([
906
908
  category, threshold.get(pc.METRIC),
907
- int(threshold.get(pc.FIRST_THRESH)),
908
- int(threshold.get(pc.SEC_THRESH)),
909
+ threshold.get("firstUpperThreshold"),
910
+ threshold.get("secondUpperThreshold"),
909
911
  threshold.get(pc.ALERT_ERR), threshold.get(pc.KPI)])
910
912
  file_handler.write_to_csv_file(output_csv_path, data_for_csv)
911
913
 
@@ -923,22 +925,31 @@ class PerformanceFunctions(object):
923
925
  :param csv_file_path: path to CSV file -- str
924
926
  :param kpi_only: set only KPI thresholds -- bool
925
927
  """
928
+ LOG.warning("Warning: This function is deprecated and will be removed "
929
+ "in version 10.4. Please explore API Calls in new "
930
+ "settings Category for getting and setting thresholds")
931
+
926
932
  def _str_to_bool(str_in):
927
933
  return str_in == 'True'
928
934
 
929
935
  data = file_handler.read_csv_values(csv_file_path)
930
-
931
936
  category_list = data.get(pc.CATEGORY)
932
937
  metric_list = data.get(pc.METRIC)
933
938
  notify_list = data.get(pc.ALERT_ERR)
934
- f_threshold_list = data.get(pc.FIRST_THRESH)
935
- s_threshold_list = data.get(pc.SEC_THRESH)
939
+ f_threshold_list = data.get("firstThreshold")
940
+ s_threshold_list = data.get("secondThreshold")
936
941
  is_kpi = data.get(pc.KPI)
937
942
 
938
943
  for i in range(0, len(metric_list)):
939
944
  if not _str_to_bool(is_kpi[i]) and kpi_only:
940
945
  continue
941
- if int(f_threshold_list[i]) >= int(s_threshold_list[i]):
946
+ if not (f_threshold_list[i]) or not (s_threshold_list[i]):
947
+ LOG.warning(
948
+ 'Not setting performance metric {m} threshold as '
949
+ 'values are not in file'.format(
950
+ m=metric_list[i], ))
951
+ continue
952
+ if (f_threshold_list[i]) >= (s_threshold_list[i]):
942
953
  LOG.warning(
943
954
  'Not setting performance metric {m} threshold, second '
944
955
  'threshold value {f} must be greater than first threshold '
@@ -946,11 +957,14 @@ class PerformanceFunctions(object):
946
957
  m=metric_list[i], f=f_threshold_list[i],
947
958
  s=s_threshold_list[i]))
948
959
  continue
949
- self.update_threshold_settings(
950
- category=category_list[i], metric=metric_list[i],
951
- alert=notify_list[i], first_threshold=f_threshold_list[i],
952
- second_threshold=s_threshold_list[i],
953
- include_realtime_trace=False)
960
+ try:
961
+ self.update_threshold_settings(
962
+ category=category_list[i], metric=metric_list[i],
963
+ alert=notify_list[i], first_threshold=f_threshold_list[i],
964
+ second_threshold=s_threshold_list[i],
965
+ include_realtime_trace=False)
966
+ except Exception as e:
967
+ LOG.error('Error updating threshold settings: {e}'.format(e=e))
954
968
 
955
969
  def get_array_keys(self):
956
970
  """List Arrays registered for performance data collection.
@@ -76,19 +76,36 @@ class EnhancedPerformanceFunctions(object):
76
76
  full_metric_collection.append(response)
77
77
  return full_metric_collection
78
78
 
79
- def get_category_metrics(self, category, array_id=None):
79
+ def get_category_metrics(self, category: str, array_id=None, filters=None):
80
80
  """Get latest data for KPI metrics for specificied performance
81
81
  category.
82
82
 
83
83
  :param array_id: 12 Digit Serial Number of Array -- int
84
+ :param filters: users can filter on the time_range and component id,
85
+ these can be combined in single query,
86
+ e.g. filters=['time_range eq 1','id ilike Oracle',
87
+ 'data_format eq Maximum']
88
+ valid values for time range are 1,2,4,8,12,
89
+ 24 in hours, you can also specify data_format to
90
+ return Average or Maximum values, note for max
91
+ values to be retuned you must be registered for
92
+ realtime statistics -- list
84
93
  :returns: full list of all KPI metrics for latest diagnostic
85
94
  timestamp for the specified array and performance category --
86
95
  dict
87
96
  """
88
97
  array_id = array_id if array_id else self.array_id
98
+ """Build the optional filter part – empty string when no filters are
99
+ given.
100
+ """
101
+ filter_part = ''
102
+ if filters: # filters is not None/empty
103
+ filter_part = '?filter=' + ','.join(filters)
104
+
89
105
  response = self.common.get_request(
90
106
  target_uri=f"/{self.enhanced_api_version}/systems"
91
107
  f"/{array_id}/performance-categories/"
92
- f"{category}",
108
+ f"{category}{filter_part}",
93
109
  resource_type=None)
110
+
94
111
  return response
@@ -920,7 +920,8 @@ class ReplicationFunctions(object):
920
920
  :param establish: establish srdf -- bool
921
921
  :param _async: if call should be async -- bool
922
922
  :param rdfg_number: rdf group number -- int
923
- :param force_new_rdf_group: if force command should be applied -- bool
923
+ :param force_new_rdf_group: ignored, present for backward
924
+ compatibility -- bool
924
925
  :returns: storage group rdf details -- dict
925
926
  """
926
927
  establish_sg = 'True' if establish else 'False'
@@ -930,11 +931,11 @@ class ReplicationFunctions(object):
930
931
  'establish': establish_sg}
931
932
  if rdfg_number is not None:
932
933
  rdf_payload['rdfgNumber'] = rdfg_number
933
- if force_new_rdf_group:
934
- LOG.warning("Parameter 'force_new_rdf_group' is no longer "
935
- "supported and will be ignored.")
936
934
  if _async:
937
935
  rdf_payload.update(ASYNC_UPDATE)
936
+ if force_new_rdf_group:
937
+ LOG.warning("Parameter 'force_new_rdf_group' is no longer "
938
+ "supported and will be ignored.")
938
939
  return self.create_resource(
939
940
  category=REPLICATION,
940
941
  resource_level=SYMMETRIX, resource_level_id=self.array_id,
@@ -1222,7 +1223,8 @@ class ReplicationFunctions(object):
1222
1223
 
1223
1224
  def modify_rdf_group(self, action, srdf_group_number, array_id=None,
1224
1225
  port_list=None, label=None, dev_list=None,
1225
- target_rdf_group=None, consistency_exempt=None):
1226
+ target_rdf_group=None, consistency_exempt=None,
1227
+ keepR1=None, keepR2=None):
1226
1228
  """Function to Modify Ports, devices or change label of RDF group.
1227
1229
 
1228
1230
  Function can be used to Add ports, move volumes between rdf groups,
@@ -1238,6 +1240,8 @@ class ReplicationFunctions(object):
1238
1240
  :param dev_list: list of volumes to be moved between RDF groups -- list
1239
1241
  :param target_rdf_group: rdfg group to move volumes to -- int
1240
1242
  :param consistency_exempt: ignore device for consistency checks -- bool
1243
+ :param keepR1: preserves data on R1 -- bool
1244
+ :param keepR2: preserves data on R2 -- bool
1241
1245
  """
1242
1246
 
1243
1247
  rdfg_action = constants.RDFG_ACTIONS.get(action.upper())
@@ -1259,6 +1263,10 @@ class ReplicationFunctions(object):
1259
1263
  'volumesToMove': dev_list,
1260
1264
  'exempt': consistency_exempt},
1261
1265
  'action': 'Move'}
1266
+ if keepR1 is not None:
1267
+ payload['move']['keepR1'] = keepR1
1268
+ if keepR2 is not None:
1269
+ payload['move']['keepR2'] = keepR2
1262
1270
 
1263
1271
  elif rdfg_action == 'set_label':
1264
1272
  payload = {
@@ -132,17 +132,8 @@ class RestRequests(object):
132
132
 
133
133
  except requests.Timeout as error:
134
134
  LOG.error(
135
- 'The {} request to URL {} timed-out, but may have '
136
- 'been successful. Please check Unisphere Server for any '
137
- 'slowness, long-running API calls are a symptom of '
138
- 'Unisphere Server limits being reached. {}. See '
139
- 'https://developer.dell.com/apis/4458/versions/10.0/docs'
140
- '/Getting%20Started/4.concurrent_operations.md, To ensure '
141
- 'limits are not being exceeded verify the number of '
142
- 'connections and calls in Unisphere for PowerMax under '
143
- 'Support > Management Server Resources or using system '
144
- 'call get_management_server_resources()'
145
- ''.format(method, url, error))
135
+ 'The {} request to URL {} timed-out, Check Unisphere '
136
+ 'connection.'.format(method, url, error))
146
137
  return None, None
147
138
 
148
139
  except r_exc.SSLError as error:
@@ -43,5 +43,6 @@ def main():
43
43
  update_version(version_files)
44
44
  print("Please verify formatting on readme.rst line 50-53")
45
45
 
46
+
46
47
  if __name__ == '__main__':
47
48
  main()