13
13
from distutils .version import LooseVersion
14
14
15
15
# The current version of this library.
16
- VERSION = "1.17 .0"
16
+ VERSION = "1.18 .0"
17
17
18
18
19
19
class FlashArray (object ):
@@ -89,6 +89,7 @@ class FlashArray(object):
89
89
"""
90
90
91
91
supported_rest_versions = [
92
+ "1.18" ,
92
93
"1.17" ,
93
94
"1.16" ,
94
95
"1.15" ,
@@ -358,7 +359,7 @@ def set_eula(self, **kwargs):
358
359
359
360
:param \*\*kwargs: See the REST API Guide on your array for the
360
361
documentation on the request:
361
- **PUT array/ eula**
362
+ **PUT eula**
362
363
:returns: EULA agreement and a dictionary describing the EULA
363
364
acceptance status on the array.
364
365
:rtype: ResponseDict
@@ -730,6 +731,30 @@ def rename_volume(self, volume, name):
730
731
"""
731
732
return self .set_volume (volume , name = name )
732
733
734
+ def promote_volume (self , volume ):
735
+ """Promote a volume
736
+ :param volume: Name of volume to be promoted.
737
+ :type volume: str
738
+
739
+ :returns: A dictionary mapping "name" to name and "promotion_status" to the
740
+ volume's latest promotion status.
741
+ :rtype: ResponseDict
742
+
743
+ """
744
+ return self .set_volume (volume , requested_promotion_state = "promoted" )
745
+
746
+ def demote_volume (self , volume ):
747
+ """Demote a volume
748
+ :param volume: Name of volume to be demoted.
749
+ :type volume: str
750
+
751
+ :returns: A dictionary mapping "name" to name and "promotion_status" to the
752
+ volume's latest promotion status.
753
+ :rtype: ResponseDict
754
+
755
+ """
756
+ return self .set_volume (volume , requested_promotion_state = "demoted" )
757
+
733
758
def recover_volume (self , volume ):
734
759
"""Recover a volume that has been destroyed but not eradicated.
735
760
@@ -1152,7 +1177,7 @@ def connect_nfs_offload(self, name, **kwargs):
1152
1177
:type name: str
1153
1178
:param \*\*kwargs: See the REST API Guide on your array for the
1154
1179
documentation on the request:
1155
- **POST nfs_offload /{}**
1180
+ **POST offload/nfs /{}**
1156
1181
:type \*\*kwargs: optional
1157
1182
1158
1183
:returns: A dictionary describing the nfs target.
@@ -1168,7 +1193,7 @@ def connect_s3_offload(self, name, **kwargs):
1168
1193
:type name: str
1169
1194
:param \*\*kwargs: See the REST API Guide on your array for the
1170
1195
documentation on the request:
1171
- **POST s3_offload /{}**
1196
+ **POST offload/s3 /{}**
1172
1197
:type \*\*kwargs: optional
1173
1198
1174
1199
:returns: A dictionary describing the S3 target.
@@ -1248,7 +1273,7 @@ def list_nfs_offload(self, **kwargs):
1248
1273
1249
1274
:param \*\*kwargs: See the REST API Guide on your array for the
1250
1275
documentation on the request:
1251
- **GET nfs_offload **
1276
+ **GET offload/nfs **
1252
1277
:type \*\*kwargs: optional
1253
1278
1254
1279
:returns: A list of dictionaries describing NFS offload connections.
@@ -1262,7 +1287,7 @@ def list_s3_offload(self, **kwargs):
1262
1287
1263
1288
:param \*\*kwargs: See the REST API Guide on your array for the
1264
1289
documentation on the request:
1265
- **GET s3_offload **
1290
+ **GET offload/s3 **
1266
1291
:type \*\*kwargs: optional
1267
1292
1268
1293
:returns: A list of dictionaries describing S3 offload connections.
@@ -1276,7 +1301,7 @@ def list_azure_offload(self, **kwargs):
1276
1301
1277
1302
:param \*\*kwargs: See the REST API Guide on your array for the
1278
1303
documentation on the request:
1279
- **GET azure_offload **
1304
+ **GET offload/azure **
1280
1305
:type \*\*kwargs: optional
1281
1306
1282
1307
:returns: A list of dictionaries describing Azure Blob offload connections.
@@ -1314,7 +1339,7 @@ def get_nfs_offload(self, name, **kwargs):
1314
1339
:type offload: str
1315
1340
:param \*\*kwargs: See the REST API Guide on your array for the
1316
1341
documentation on the request:
1317
- **GET nfs_offload /::offload**
1342
+ **GET offload/nfs /::offload**
1318
1343
:type \*\*kwargs: optional
1319
1344
1320
1345
:returns: A dictionary describing the nfs offload connection.
@@ -1336,7 +1361,7 @@ def get_s3_offload(self, name, **kwargs):
1336
1361
:type offload: str
1337
1362
:param \*\*kwargs: See the REST API Guide on your array for the
1338
1363
documentation on the request:
1339
- **GET s3_offload /::offload**
1364
+ **GET offload/s3 /::offload**
1340
1365
:type \*\*kwargs: optional
1341
1366
1342
1367
:returns: A dictionary describing the S3 offload connection.
@@ -1352,7 +1377,7 @@ def get_azure_offload(self, name, **kwargs):
1352
1377
:type offload: str
1353
1378
:param \*\*kwargs: See the REST API Guide on your array for the
1354
1379
documentation on the request:
1355
- **GET azure_offload /::offload**
1380
+ **GET offload/azure /::offload**
1356
1381
:type \*\*kwargs: optional
1357
1382
1358
1383
:returns: A dictionary describing the Azure Blob offload connection.
@@ -1394,10 +1419,6 @@ def get_network_interface(self, interface, **kwargs):
1394
1419
1395
1420
:param interface: Name of network interface to get information about.
1396
1421
:type interface: str
1397
- :param \*\*kwargs: See the REST API Guide on your array for the
1398
- documentation on the request:
1399
- **GET network/:network_component**
1400
- :type \*\*kwargs: optional
1401
1422
1402
1423
:returns: A dictionary describing the interface.
1403
1424
:rtype: ResponseDict
@@ -1408,11 +1429,6 @@ def get_network_interface(self, interface, **kwargs):
1408
1429
def list_network_interfaces (self , ** kwargs ):
1409
1430
"""Get a list of dictionaries describing network interfaces.
1410
1431
1411
- :param \*\*kwargs: See the REST API Guide on your array for the
1412
- documentation on the request:
1413
- **GET network**
1414
- :type \*\*kwargs: optional
1415
-
1416
1432
:returns: A list of dictionaries describing each network interface.
1417
1433
:rtype: ResponseList
1418
1434
@@ -3511,10 +3527,6 @@ def get_kmip(self, name, **kwargs):
3511
3527
3512
3528
:param name: The name of the KMIP config to operate on.
3513
3529
:type name: string
3514
- :param \*\*kwargs: See the REST API Guide on your array for the
3515
- documentation on the request:
3516
- **GET kmip/:kmip**
3517
- :type \*\*kwargs: optional
3518
3530
3519
3531
:returns: A list of dictionaries containing the requested kmip configuration.
3520
3532
:rtype: ResponseList
@@ -3748,6 +3760,8 @@ def get_app_node(self, app_name, **kwargs):
3748
3760
def schedule_maintenance_window (self , ** kwargs ):
3749
3761
"""Schedule a maintenance window and return a dictionary describing it.
3750
3762
3763
+ :param name: Name of the maintenance window to be scheduled.
3764
+ :type name: str
3751
3765
:param \*\*kwargs: See the REST API Guide on your array for the
3752
3766
documentation on the request:
3753
3767
**POST maintenance_window**
@@ -3763,10 +3777,8 @@ def schedule_maintenance_window(self, **kwargs):
3763
3777
def unschedule_maintenance_window (self , ** kwargs ):
3764
3778
"""Unschedule a maintenance window and return a dictionary describing it.
3765
3779
3766
- param \*\*kwargs: See the REST API Guide on your array for the
3767
- documentation on the request:
3768
- **DELETE maintenance_window**
3769
- :type \*\*kwargs: optional
3780
+ :param name: Name of the maintenance window to be unscheduled.
3781
+ :type name: str
3770
3782
3771
3783
:returns: A dictionary describing the unscheduled maintenance window.
3772
3784
:rtype: ResponseDict
0 commit comments