1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
|
#!/usr/bin/python
# Copyright: (c) 2021, Dell Technologies
# Apache License version 2.0 (see MODULE-LICENSE or http://www.apache.org/licenses/LICENSE-2.0.txt)
"""Ansible module for Gathering information about Dell Technologies (Dell) PowerFlex"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = r'''
---
module: info
version_added: '1.0.0'
short_description: Gathering information about Dell PowerFlex
description:
- Gathering information about Dell PowerFlex storage system includes
getting the api details, list of volumes, SDSs, SDCs, storage pools,
protection domains, snapshot policies, and devices.
extends_documentation_fragment:
- dellemc.powerflex.powerflex
author:
- Arindam Datta (@dattaarindam) <ansible.team@dell.com>
options:
gather_subset:
description:
- List of string variables to specify the Powerflex storage system
entities for which information is required.
- Volumes - C(vol).
- Storage pools - C(storage_pool).
- Protection domains - C(protection_domain).
- SDCs - C(sdc).
- SDSs - C(sds).
- Snapshot policies - C(snapshot_policy).
- Devices - C(device).
- Replication consistency groups - C(rcg).
choices: [vol, storage_pool, protection_domain, sdc, sds,
snapshot_policy, device, rcg]
type: list
elements: str
filters:
description:
- List of filters to support filtered output for storage entities.
- Each filter is a list of I(filter_key), I(filter_operator), I(filter_value).
- Supports passing of multiple filters.
type: list
elements: dict
suboptions:
filter_key:
description:
- Name identifier of the filter.
type: str
required: true
filter_operator:
description:
- Operation to be performed on filter key.
type: str
choices: [equal]
required: true
filter_value:
description:
- Value of the filter key.
type: str
required: true
notes:
- The I(check_mode) is supported.
'''
EXAMPLES = r'''
- name: Get detailed list of PowerFlex entities
dellemc.powerflex.info:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
gather_subset:
- vol
- storage_pool
- protection_domain
- sdc
- sds
- snapshot_policy
- device
- rcg
- name: Get a subset list of PowerFlex volumes
dellemc.powerflex.info:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
gather_subset:
- vol
filters:
- filter_key: "name"
filter_operator: "equal"
filter_value: "ansible_test"
'''
RETURN = r'''
changed:
description: Whether or not the resource has changed.
returned: always
type: bool
sample: 'false'
Array_Details:
description: System entities of PowerFlex storage array.
returned: always
type: dict
contains:
addressSpaceUsage:
description: Address space usage.
type: str
authenticationMethod:
description: Authentication method.
type: str
capacityAlertCriticalThresholdPercent:
description: Capacity alert critical threshold percentage.
type: int
capacityAlertHighThresholdPercent:
description: Capacity alert high threshold percentage.
type: int
capacityTimeLeftInDays:
description: Capacity time left in days.
type: str
cliPasswordAllowed:
description: CLI password allowed.
type: bool
daysInstalled:
description: Days installed.
type: int
defragmentationEnabled:
description: Defragmentation enabled.
type: bool
enterpriseFeaturesEnabled:
description: Enterprise features enabled.
type: bool
id:
description: The ID of the system.
type: str
installId:
description: installation Id.
type: str
isInitialLicense:
description: Initial license.
type: bool
lastUpgradeTime:
description: Last upgrade time.
type: int
managementClientSecureCommunicationEnabled:
description: Management client secure communication enabled.
type: bool
maxCapacityInGb:
description: Maximum capacity in GB.
type: dict
mdmCluster:
description: MDM cluster details.
type: dict
mdmExternalPort:
description: MDM external port.
type: int
mdmManagementPort:
description: MDM management port.
type: int
mdmSecurityPolicy:
description: MDM security policy.
type: str
showGuid:
description: Show guid.
type: bool
swid:
description: SWID.
type: str
systemVersionName:
description: System version and name.
type: str
tlsVersion:
description: TLS version.
type: str
upgradeState:
description: Upgrade state.
type: str
sample: {
"addressSpaceUsage": "Normal",
"authenticationMethod": "Native",
"capacityAlertCriticalThresholdPercent": 90,
"capacityAlertHighThresholdPercent": 80,
"capacityTimeLeftInDays": "24",
"cliPasswordAllowed": true,
"daysInstalled": 66,
"defragmentationEnabled": true,
"enterpriseFeaturesEnabled": true,
"id": "4a54a8ba6df0690f",
"installId": "38622771228e56db",
"isInitialLicense": true,
"lastUpgradeTime": 0,
"managementClientSecureCommunicationEnabled": true,
"maxCapacityInGb": "Unlimited",
"mdmCluster": {
"clusterMode": "ThreeNodes",
"clusterState": "ClusteredNormal",
"goodNodesNum": 3,
"goodReplicasNum": 2,
"id": "5356091375512217871",
"master": {
"id": "6101582c2ca8db00",
"ips": [
"10.47.xxx.xxx"
],
"managementIPs": [
"10.47.xxx.xxx"
],
"name": "node0",
"opensslVersion": "OpenSSL 1.0.2k-fips 26 Jan 2017",
"port": 9011,
"role": "Manager",
"status": "Normal",
"versionInfo": "R3_6.0.0",
"virtualInterfaces": [
"ens160"
]
},
"slaves": [
{
"id": "23fb724015661901",
"ips": [
"10.47.xxx.xxx"
],
"managementIPs": [
"10.47.xxx.xxx"
],
"opensslVersion": "OpenSSL 1.0.2k-fips 26 Jan 2017",
"port": 9011,
"role": "Manager",
"status": "Normal",
"versionInfo": "R3_6.0.0",
"virtualInterfaces": [
"ens160"
]
}
],
"tieBreakers": [
{
"id": "6ef27eb20d0c1202",
"ips": [
"10.47.xxx.xxx"
],
"managementIPs": [
"10.47.xxx.xxx"
],
"opensslVersion": "N/A",
"port": 9011,
"role": "TieBreaker",
"status": "Normal",
"versionInfo": "R3_6.0.0"
}
]
},
"mdmExternalPort": 7611,
"mdmManagementPort": 6611,
"mdmSecurityPolicy": "None",
"showGuid": true,
"swid": "",
"systemVersionName": "DellEMC PowerFlex Version: R3_6.0.354",
"tlsVersion": "TLSv1.2",
"upgradeState": "NoUpgrade"
}
API_Version:
description: API version of PowerFlex API Gateway.
returned: always
type: str
sample: "3.5"
Protection_Domains:
description: Details of all protection domains.
returned: always
type: list
contains:
id:
description: protection domain id.
type: str
name:
description: protection domain name.
type: str
sample: [
{
"id": "9300e90900000001",
"name": "domain2"
},
{
"id": "9300c1f900000000",
"name": "domain1"
}
]
SDCs:
description: Details of storage data clients.
returned: always
type: list
contains:
id:
description: storage data client id.
type: str
name:
description: storage data client name.
type: str
sample: [
{
"id": "07335d3d00000006",
"name": "LGLAP203"
},
{
"id": "07335d3c00000005",
"name": "LGLAP178"
},
{
"id": "0733844a00000003"
}
]
SDSs:
description: Details of storage data servers.
returned: always
type: list
contains:
id:
description: storage data server id.
type: str
name:
description: storage data server name.
type: str
sample: [
{
"id": "8f3bb0cc00000002",
"name": "node0"
},
{
"id": "8f3bb0ce00000000",
"name": "node1"
},
{
"id": "8f3bb15300000001",
"name": "node22"
}
]
Snapshot_Policies:
description: Details of snapshot policies.
returned: always
type: list
contains:
id:
description: snapshot policy id.
type: str
name:
description: snapshot policy name.
type: str
sample: [
{
"id": "2b380c5c00000000",
"name": "sample_snap_policy"
},
{
"id": "2b380c5d00000001",
"name": "sample_snap_policy_1"
}
]
Storage_Pools:
description: Details of storage pools.
returned: always
type: list
contains:
mediaType:
description: Type of devices in the storage pool.
type: str
useRfcache:
description: Enable/Disable RFcache on a specific storage pool.
type: bool
useRmcache:
description: Enable/Disable RMcache on a specific storage pool.
type: bool
id:
description: ID of the storage pool under protection domain.
type: str
name:
description: Name of the storage pool under protection domain.
type: str
protectionDomainId:
description: ID of the protection domain in which pool resides.
type: str
protectionDomainName:
description: Name of the protection domain in which pool resides.
type: str
statistics:
description: Statistics details of the storage pool.
type: dict
contains:
capacityInUseInKb:
description: Total capacity of the storage pool.
type: str
unusedCapacityInKb:
description: Unused capacity of the storage pool.
type: str
deviceIds:
description: Device Ids of the storage pool.
type: list
sample: [
{
"addressSpaceUsage": "Normal",
"addressSpaceUsageType": "DeviceCapacityLimit",
"backgroundScannerBWLimitKBps": 3072,
"backgroundScannerMode": "DataComparison",
"bgScannerCompareErrorAction": "ReportAndFix",
"bgScannerReadErrorAction": "ReportAndFix",
"capacityAlertCriticalThreshold": 90,
"capacityAlertHighThreshold": 80,
"capacityUsageState": "Normal",
"capacityUsageType": "NetCapacity",
"checksumEnabled": false,
"compressionMethod": "Invalid",
"dataLayout": "MediumGranularity",
"externalAccelerationType": "None",
"fglAccpId": null,
"fglExtraCapacity": null,
"fglMaxCompressionRatio": null,
"fglMetadataSizeXx100": null,
"fglNvdimmMetadataAmortizationX100": null,
"fglNvdimmWriteCacheSizeInMb": null,
"fglOverProvisioningFactor": null,
"fglPerfProfile": null,
"fglWriteAtomicitySize": null,
"fragmentationEnabled": true,
"id": "e0d8f6c900000000",
"links": [
{
"href": "/api/instances/StoragePool::e0d8f6c900000000",
"rel": "self"
},
{
"href": "/api/instances/StoragePool::e0d8f6c900000000
/relationships/Statistics",
"rel": "/api/StoragePool/relationship/Statistics"
},
{
"href": "/api/instances/StoragePool::e0d8f6c900000000
/relationships/SpSds",
"rel": "/api/StoragePool/relationship/SpSds"
},
{
"href": "/api/instances/StoragePool::e0d8f6c900000000
/relationships/Volume",
"rel": "/api/StoragePool/relationship/Volume"
},
{
"href": "/api/instances/StoragePool::e0d8f6c900000000
/relationships/Device",
"rel": "/api/StoragePool/relationship/Device"
},
{
"href": "/api/instances/StoragePool::e0d8f6c900000000
/relationships/VTree",
"rel": "/api/StoragePool/relationship/VTree"
},
{
"href": "/api/instances/ProtectionDomain::9300c1f900000000",
"rel": "/api/parent/relationship/protectionDomainId"
}
],
"statistics": {
"BackgroundScannedInMB": 3466920,
"activeBckRebuildCapacityInKb": 0,
"activeEnterProtectedMaintenanceModeCapacityInKb": 0,
"aggregateCompressionLevel": "Uncompressed",
"atRestCapacityInKb": 1248256,
"backgroundScanCompareErrorCount": 0,
"backgroundScanFixedCompareErrorCount": 0,
"bckRebuildReadBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"bckRebuildWriteBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"capacityAvailableForVolumeAllocationInKb": 369098752,
"capacityInUseInKb": 2496512,
"capacityInUseNoOverheadInKb": 2496512,
"capacityLimitInKb": 845783040,
"compressedDataCompressionRatio": 0.0,
"compressionRatio": 1.0,
"currentFglMigrationSizeInKb": 0,
"deviceIds": [
],
"enterProtectedMaintenanceModeCapacityInKb": 0,
"enterProtectedMaintenanceModeReadBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"enterProtectedMaintenanceModeWriteBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"exitProtectedMaintenanceModeReadBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"exitProtectedMaintenanceModeWriteBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"exposedCapacityInKb": 0,
"failedCapacityInKb": 0,
"fwdRebuildReadBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"fwdRebuildWriteBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"inMaintenanceCapacityInKb": 0,
"inMaintenanceVacInKb": 0,
"inUseVacInKb": 184549376,
"inaccessibleCapacityInKb": 0,
"logWrittenBlocksInKb": 0,
"maxCapacityInKb": 845783040,
"migratingVolumeIds": [
],
"migratingVtreeIds": [
],
"movingCapacityInKb": 0,
"netCapacityInUseInKb": 1248256,
"normRebuildCapacityInKb": 0,
"normRebuildReadBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"normRebuildWriteBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"numOfDeviceAtFaultRebuilds": 0,
"numOfDevices": 3,
"numOfIncomingVtreeMigrations": 0,
"numOfVolumes": 8,
"numOfVolumesInDeletion": 0,
"numOfVtrees": 8,
"overallUsageRatio": 73.92289,
"pendingBckRebuildCapacityInKb": 0,
"pendingEnterProtectedMaintenanceModeCapacityInKb": 0,
"pendingExitProtectedMaintenanceModeCapacityInKb": 0,
"pendingFwdRebuildCapacityInKb": 0,
"pendingMovingCapacityInKb": 0,
"pendingMovingInBckRebuildJobs": 0,
"persistentChecksumBuilderProgress": 100.0,
"persistentChecksumCapacityInKb": 414720,
"primaryReadBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"primaryReadFromDevBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"primaryReadFromRmcacheBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"primaryVacInKb": 92274688,
"primaryWriteBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"protectedCapacityInKb": 2496512,
"protectedVacInKb": 184549376,
"provisionedAddressesInKb": 2496512,
"rebalanceCapacityInKb": 0,
"rebalanceReadBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"rebalanceWriteBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"rfacheReadHit": 0,
"rfacheWriteHit": 0,
"rfcacheAvgReadTime": 0,
"rfcacheAvgWriteTime": 0,
"rfcacheIoErrors": 0,
"rfcacheIosOutstanding": 0,
"rfcacheIosSkipped": 0,
"rfcacheReadMiss": 0,
"rmPendingAllocatedInKb": 0,
"rmPendingThickInKb": 0,
"rplJournalCapAllowed": 0,
"rplTotalJournalCap": 0,
"rplUsedJournalCap": 0,
"secondaryReadBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"secondaryReadFromDevBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"secondaryReadFromRmcacheBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"secondaryVacInKb": 92274688,
"secondaryWriteBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"semiProtectedCapacityInKb": 0,
"semiProtectedVacInKb": 0,
"snapCapacityInUseInKb": 0,
"snapCapacityInUseOccupiedInKb": 0,
"snapshotCapacityInKb": 0,
"spSdsIds": [
"abdfe71b00030001",
"abdce71d00040001",
"abdde71e00050001"
],
"spareCapacityInKb": 84578304,
"targetOtherLatency": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"targetReadLatency": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"targetWriteLatency": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"tempCapacityInKb": 0,
"tempCapacityVacInKb": 0,
"thickCapacityInUseInKb": 0,
"thinAndSnapshotRatio": 73.92289,
"thinCapacityAllocatedInKm": 184549376,
"thinCapacityInUseInKb": 0,
"thinUserDataCapacityInKb": 2496512,
"totalFglMigrationSizeInKb": 0,
"totalReadBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"totalWriteBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"trimmedUserDataCapacityInKb": 0,
"unreachableUnusedCapacityInKb": 0,
"unusedCapacityInKb": 758708224,
"userDataCapacityInKb": 2496512,
"userDataCapacityNoTrimInKb": 2496512,
"userDataReadBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"userDataSdcReadLatency": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"userDataSdcTrimLatency": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"userDataSdcWriteLatency": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"userDataTrimBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"userDataWriteBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"volMigrationReadBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"volMigrationWriteBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"volumeAddressSpaceInKb": 922XXXXX,
"volumeAllocationLimitInKb": 3707XXXXX,
"volumeIds": [
"456afc7900XXXXXXXX"
],
"vtreeAddresSpaceInKb": 92274688,
"vtreeIds": [
"32b1681bXXXXXXXX",
]
},
"mediaType": "HDD",
"name": "pool1",
"numOfParallelRebuildRebalanceJobsPerDevice": 2,
"persistentChecksumBuilderLimitKb": 3072,
"persistentChecksumEnabled": true,
"persistentChecksumState": "Protected",
"persistentChecksumValidateOnRead": false,
"protectedMaintenanceModeIoPriorityAppBwPerDeviceThresholdInKbps": null,
"protectedMaintenanceModeIoPriorityAppIopsPerDeviceThreshold": null,
"protectedMaintenanceModeIoPriorityBwLimitPerDeviceInKbps": 10240,
"protectedMaintenanceModeIoPriorityNumOfConcurrentIosPerDevice": 1,
"protectedMaintenanceModeIoPriorityPolicy": "limitNumOfConcurrentIos",
"protectedMaintenanceModeIoPriorityQuietPeriodInMsec": null,
"protectionDomainId": "9300c1f900000000",
"protectionDomainName": "domain1",
"rebalanceEnabled": true,
"rebalanceIoPriorityAppBwPerDeviceThresholdInKbps": null,
"rebalanceIoPriorityAppIopsPerDeviceThreshold": null,
"rebalanceIoPriorityBwLimitPerDeviceInKbps": 10240,
"rebalanceIoPriorityNumOfConcurrentIosPerDevice": 1,
"rebalanceIoPriorityPolicy": "favorAppIos",
"rebalanceIoPriorityQuietPeriodInMsec": null,
"rebuildEnabled": true,
"rebuildIoPriorityAppBwPerDeviceThresholdInKbps": null,
"rebuildIoPriorityAppIopsPerDeviceThreshold": null,
"rebuildIoPriorityBwLimitPerDeviceInKbps": 10240,
"rebuildIoPriorityNumOfConcurrentIosPerDevice": 1,
"rebuildIoPriorityPolicy": "limitNumOfConcurrentIos",
"rebuildIoPriorityQuietPeriodInMsec": null,
"replicationCapacityMaxRatio": 32,
"rmcacheWriteHandlingMode": "Cached",
"sparePercentage": 10,
"useRfcache": false,
"useRmcache": false,
"vtreeMigrationIoPriorityAppBwPerDeviceThresholdInKbps": null,
"vtreeMigrationIoPriorityAppIopsPerDeviceThreshold": null,
"vtreeMigrationIoPriorityBwLimitPerDeviceInKbps": 10240,
"vtreeMigrationIoPriorityNumOfConcurrentIosPerDevice": 1,
"vtreeMigrationIoPriorityPolicy": "favorAppIos",
"vtreeMigrationIoPriorityQuietPeriodInMsec": null,
"zeroPaddingEnabled": true
}
]
Volumes:
description: Details of volumes.
returned: always
type: list
contains:
id:
description: The ID of the volume.
type: str
mappedSdcInfo:
description: The details of the mapped SDC.
type: dict
contains:
sdcId:
description: ID of the SDC.
type: str
sdcName:
description: Name of the SDC.
type: str
sdcIp:
description: IP of the SDC.
type: str
accessMode:
description: mapping access mode for the specified volume.
type: str
limitIops:
description: IOPS limit for the SDC.
type: int
limitBwInMbps:
description: Bandwidth limit for the SDC.
type: int
name:
description: Name of the volume.
type: str
sizeInKb:
description: Size of the volume in Kb.
type: int
sizeInGb:
description: Size of the volume in Gb.
type: int
storagePoolId:
description: ID of the storage pool in which volume resides.
type: str
storagePoolName:
description: Name of the storage pool in which volume resides.
type: str
protectionDomainId:
description: ID of the protection domain in which volume resides.
type: str
protectionDomainName:
description: Name of the protection domain in which volume resides.
type: str
snapshotPolicyId:
description: ID of the snapshot policy associated with volume.
type: str
snapshotPolicyName:
description: Name of the snapshot policy associated with volume.
type: str
snapshotsList:
description: List of snapshots associated with the volume.
type: str
"statistics":
description: Statistics details of the storage pool.
type: dict
contains:
"numOfChildVolumes":
description: Number of child volumes.
type: int
"numOfMappedSdcs":
description: Number of mapped Sdcs of the volume.
type: int
sample: [
{
"accessModeLimit": "ReadWrite",
"ancestorVolumeId": null,
"autoSnapshotGroupId": null,
"compressionMethod": "Invalid",
"consistencyGroupId": null,
"creationTime": 1661234220,
"dataLayout": "MediumGranularity",
"id": "456afd7XXXXXXX",
"lockedAutoSnapshot": false,
"lockedAutoSnapshotMarkedForRemoval": false,
"managedBy": "ScaleIO",
"mappedSdcInfo": [
{
"accessMode": "ReadWrite",
"isDirectBufferMapping": false,
"limitBwInMbps": 0,
"limitIops": 0,
"sdcId": "c42425cbXXXXX",
"sdcIp": "10.XXX.XX.XX",
"sdcName": null
}
],
"name": "vol-1",
"notGenuineSnapshot": false,
"originalExpiryTime": 0,
"pairIds": null,
"replicationJournalVolume": false,
"replicationTimeStamp": 0,
"retentionLevels": [
],
"secureSnapshotExpTime": 0,
"sizeInKb": 8388608,
"snplIdOfAutoSnapshot": null,
"snplIdOfSourceVolume": null,
"statistics": {
"childVolumeIds": [
],
"descendantVolumeIds": [
],
"initiatorSdcId": null,
"mappedSdcIds": [
"c42425XXXXXX"
],
"numOfChildVolumes": 0,
"numOfDescendantVolumes": 0,
"numOfMappedSdcs": 1,
"registrationKey": null,
"registrationKeys": [
],
"replicationJournalVolume": false,
"replicationState": "UnmarkedForReplication",
"reservationType": "NotReserved",
"rplTotalJournalCap": 0,
"rplUsedJournalCap": 0,
"userDataReadBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"userDataSdcReadLatency": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"userDataSdcTrimLatency": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"userDataSdcWriteLatency": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"userDataTrimBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
},
"userDataWriteBwc": {
"numOccured": 0,
"numSeconds": 0,
"totalWeightInKb": 0
}
},
"storagePoolId": "7630a248XXXXXXX",
"timeStampIsAccurate": false,
"useRmcache": false,
"volumeReplicationState": "UnmarkedForReplication",
"volumeType": "ThinProvisioned",
"vtreeId": "32b168bXXXXXX"
}
]
Devices:
description: Details of devices.
returned: always
type: list
contains:
id:
description: device id.
type: str
name:
description: device name.
type: str
sample: [
{
"id": "b6efa59900000000",
"name": "device230"
},
{
"id": "b6efa5fa00020000",
"name": "device_node0"
},
{
"id": "b7f3a60900010000",
"name": "device22"
}
]
Replication_Consistency_Groups:
description: Details of rcgs.
returned: always
type: list
contains:
id:
description: The ID of the replication consistency group.
type: str
name:
description: The name of the replication consistency group.
type: str
protectionDomainId:
description: The Protection Domain ID of the replication consistency group.
type: str
peerMdmId:
description: The ID of the peer MDM of the replication consistency group.
type: str
remoteId:
description: The ID of the remote replication consistency group.
type: str
remoteMdmId:
description: The ID of the remote MDM of the replication consistency group.
type: str
currConsistMode:
description: The current consistency mode of the replication consistency group.
type: str
freezeState:
description: The freeze state of the replication consistency group.
type: str
lifetimeState:
description: The Lifetime state of the replication consistency group.
type: str
pauseMode:
description: The Lifetime state of the replication consistency group.
type: str
snapCreationInProgress:
description: Whether the process of snapshot creation of the replication consistency group is in progress or not.
type: bool
lastSnapGroupId:
description: ID of the last snapshot of the replication consistency group.
type: str
lastSnapCreationRc:
description: The return code of the last snapshot of the replication consistency group.
type: int
targetVolumeAccessMode:
description: The access mode of the target volume of the replication consistency group.
type: str
remoteProtectionDomainId:
description: The ID of the remote Protection Domain.
type: str
remoteProtectionDomainName:
description: The Name of the remote Protection Domain.
type: str
failoverType:
description: The type of failover of the replication consistency group.
type: str
failoverState:
description: The state of failover of the replication consistency group.
type: str
activeLocal:
description: Whether the local replication consistency group is active.
type: bool
activeRemote:
description: Whether the remote replication consistency group is active
type: bool
abstractState:
description: The abstract state of the replication consistency group.
type: str
localActivityState:
description: The state of activity of the local replication consistency group.
type: str
remoteActivityState:
description: The state of activity of the remote replication consistency group..
type: str
inactiveReason:
description: The reason for the inactivity of the replication consistency group.
type: int
rpoInSeconds:
description: The RPO value of the replication consistency group in seconds.
type: int
replicationDirection:
description: The direction of the replication of the replication consistency group.
type: str
disasterRecoveryState:
description: The state of disaster recovery of the local replication consistency group.
type: str
remoteDisasterRecoveryState:
description: The state of disaster recovery of the remote replication consistency group.
type: str
error:
description: The error code of the replication consistency group.
type: int
type:
description: The type of the replication consistency group.
type: str
sample: {
"protectionDomainId": "b969400500000000",
"peerMdmId": "6c3d94f600000000",
"remoteId": "2130961a00000000",
"remoteMdmId": "0e7a082862fedf0f",
"currConsistMode": "Consistent",
"freezeState": "Unfrozen",
"lifetimeState": "Normal",
"pauseMode": "None",
"snapCreationInProgress": false,
"lastSnapGroupId": "e58280b300000001",
"lastSnapCreationRc": "SUCCESS",
"targetVolumeAccessMode": "NoAccess",
"remoteProtectionDomainId": "4eeb304600000000",
"remoteProtectionDomainName": "domain1",
"failoverType": "None",
"failoverState": "None",
"activeLocal": true,
"activeRemote": true,
"abstractState": "Ok",
"localActivityState": "Active",
"remoteActivityState": "Active",
"inactiveReason": 11,
"rpoInSeconds": 30,
"replicationDirection": "LocalToRemote",
"disasterRecoveryState": "None",
"remoteDisasterRecoveryState": "None",
"error": 65,
"name": "test_rcg",
"type": "User",
"id": "aadc17d500000000"
}
'''
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.dellemc.powerflex.plugins.module_utils.storage.dell \
import utils
LOG = utils.get_logger('info')
class PowerFlexInfo(object):
"""Class with Info operations"""
filter_mapping = {'equal': 'eq.'}
def __init__(self):
""" Define all parameters required by this module"""
self.module_params = utils.get_powerflex_gateway_host_parameters()
self.module_params.update(get_powerflex_info_parameters())
self.filter_keys = sorted(
[k for k in self.module_params['filters']['options'].keys()
if 'filter' in k])
""" initialize the ansible module """
self.module = AnsibleModule(argument_spec=self.module_params,
supports_check_mode=True)
utils.ensure_required_libs(self.module)
try:
self.powerflex_conn = utils.get_powerflex_gateway_host_connection(
self.module.params)
LOG.info('Got the PowerFlex system connection object instance')
LOG.info('The check_mode flag %s', self.module.check_mode)
except Exception as e:
LOG.error(str(e))
self.module.fail_json(msg=str(e))
def get_api_details(self):
""" Get api details of the array """
try:
LOG.info('Getting API details ')
api_version = self.powerflex_conn.system.api_version()
return api_version
except Exception as e:
msg = 'Get API details from Powerflex array failed with' \
' error %s' % (str(e))
LOG.error(msg)
self.module.fail_json(msg=msg)
def get_array_details(self):
""" Get system details of a powerflex array """
try:
LOG.info('Getting array details ')
entity_list = ['addressSpaceUsage', 'authenticationMethod',
'capacityAlertCriticalThresholdPercent',
'capacityAlertHighThresholdPercent',
'capacityTimeLeftInDays', 'cliPasswordAllowed',
'daysInstalled', 'defragmentationEnabled',
'enterpriseFeaturesEnabled', 'id', 'installId',
'isInitialLicense', 'lastUpgradeTime',
'managementClientSecureCommunicationEnabled',
'maxCapacityInGb', 'mdmCluster',
'mdmExternalPort', 'mdmManagementPort',
'mdmSecurityPolicy', 'showGuid', 'swid',
'systemVersionName', 'tlsVersion', 'upgradeState']
sys_list = self.powerflex_conn.system.get()
sys_details_list = []
for sys in sys_list:
sys_details = {}
for entity in entity_list:
if entity in sys.keys():
sys_details.update({entity: sys[entity]})
if sys_details:
sys_details_list.append(sys_details)
return sys_details_list
except Exception as e:
msg = 'Get array details from Powerflex array failed with' \
' error %s' % (str(e))
LOG.error(msg)
self.module.fail_json(msg=msg)
def get_sdc_list(self, filter_dict=None):
""" Get the list of sdcs on a given PowerFlex storage system """
try:
LOG.info('Getting SDC list ')
if filter_dict:
sdc = self.powerflex_conn.sdc.get(filter_fields=filter_dict)
else:
sdc = self.powerflex_conn.sdc.get()
return result_list(sdc)
except Exception as e:
msg = 'Get SDC list from powerflex array failed with' \
' error %s' % (str(e))
LOG.error(msg)
self.module.fail_json(msg=msg)
def get_sds_list(self, filter_dict=None):
""" Get the list of sdses on a given PowerFlex storage system """
try:
LOG.info('Getting SDS list ')
if filter_dict:
sds = self.powerflex_conn.sds.get(filter_fields=filter_dict)
else:
sds = self.powerflex_conn.sds.get()
return result_list(sds)
except Exception as e:
msg = 'Get sds list from powerflex array failed with' \
' error %s' % (str(e))
LOG.error(msg)
self.module.fail_json(msg=msg)
def get_pd_list(self, filter_dict=None):
""" Get the list of Protection Domains on a given PowerFlex
storage system """
try:
LOG.info('Getting protection domain list ')
if filter_dict:
pd = self.powerflex_conn.protection_domain.get(filter_fields=filter_dict)
else:
pd = self.powerflex_conn.protection_domain.get()
return result_list(pd)
except Exception as e:
msg = 'Get protection domain list from powerflex array failed ' \
'with error %s' % (str(e))
LOG.error(msg)
self.module.fail_json(msg=msg)
def get_storage_pool_list(self, filter_dict=None):
""" Get the list of storage pools on a given PowerFlex storage
system """
try:
LOG.info('Getting storage pool list ')
if filter_dict:
pool = self.powerflex_conn.storage_pool.get(filter_fields=filter_dict)
else:
pool = self.powerflex_conn.storage_pool.get()
if pool:
statistics_map = self.powerflex_conn.utility.get_statistics_for_all_storagepools()
list_of_pool_ids_in_statistics = statistics_map.keys()
for item in pool:
item['statistics'] = statistics_map[item['id']] if item['id'] in list_of_pool_ids_in_statistics else {}
return result_list(pool)
except Exception as e:
msg = 'Get storage pool list from powerflex array failed with' \
' error %s' % (str(e))
LOG.error(msg)
self.module.fail_json(msg=msg)
def get_replication_consistency_group_list(self, filter_dict=None):
""" Get the list of replication consistency group on a given PowerFlex storage
system """
try:
LOG.info('Getting replication consistency group list ')
if filter_dict:
rcgs = self.powerflex_conn.replication_consistency_group.get(filter_fields=filter_dict)
else:
rcgs = self.powerflex_conn.replication_consistency_group.get()
if rcgs:
api_version = self.powerflex_conn.system.get()[0]['mdmCluster']['master']['versionInfo']
statistics_map = \
self.powerflex_conn.replication_consistency_group.get_all_statistics(utils.is_version_less_than_3_6(api_version))
list_of_rcg_ids_in_statistics = statistics_map.keys()
for rcg in rcgs:
rcg.pop('links', None)
rcg['statistics'] = statistics_map[rcg['id']] if rcg['id'] in list_of_rcg_ids_in_statistics else {}
return result_list(rcgs)
except Exception as e:
msg = 'Get replication consistency group list from powerflex array failed with' \
' error %s' % (str(e))
LOG.error(msg)
self.module.fail_json(msg=msg)
def get_volumes_list(self, filter_dict=None):
""" Get the list of volumes on a given PowerFlex storage
system """
try:
LOG.info('Getting volumes list ')
if filter_dict:
volumes = self.powerflex_conn.volume.get(filter_fields=filter_dict)
else:
volumes = self.powerflex_conn.volume.get()
if volumes:
statistics_map = self.powerflex_conn.utility.get_statistics_for_all_volumes()
list_of_vol_ids_in_statistics = statistics_map.keys()
for item in volumes:
item['statistics'] = statistics_map[item['id']] if item['id'] in list_of_vol_ids_in_statistics else {}
return result_list(volumes)
except Exception as e:
msg = 'Get volumes list from powerflex array failed with' \
' error %s' % (str(e))
LOG.error(msg)
self.module.fail_json(msg=msg)
def get_snapshot_policy_list(self, filter_dict=None):
""" Get the list of snapshot schedules on a given PowerFlex storage
system """
try:
LOG.info('Getting snapshot schedules list ')
if filter_dict:
snapshot_schedules = \
self.powerflex_conn.snapshot_policy.get(
filter_fields=filter_dict)
else:
snapshot_schedules = \
self.powerflex_conn.snapshot_policy.get()
return result_list(snapshot_schedules)
except Exception as e:
msg = 'Get snapshot schedules list from powerflex array failed ' \
'with error %s' % (str(e))
LOG.error(msg)
self.module.fail_json(msg=msg)
def get_devices_list(self, filter_dict=None):
""" Get the list of devices on a given PowerFlex storage
system """
try:
LOG.info('Getting device list ')
if filter_dict:
devices = self.powerflex_conn.device.get(filter_fields=filter_dict)
else:
devices = self.powerflex_conn.device.get()
return result_list(devices)
except Exception as e:
msg = 'Get device list from powerflex array failed ' \
'with error %s' % (str(e))
LOG.error(msg)
self.module.fail_json(msg=msg)
def validate_filter(self, filter_dict):
""" Validate given filter_dict """
is_invalid_filter = self.filter_keys != sorted(list(filter_dict))
if is_invalid_filter:
msg = "Filter should have all keys: '{0}'".format(
", ".join(self.filter_keys))
LOG.error(msg)
self.module.fail_json(msg=msg)
is_invalid_filter = [filter_dict[i] is None for i in filter_dict]
if True in is_invalid_filter:
msg = "Filter keys: '{0}' cannot be None".format(self.filter_keys)
LOG.error(msg)
self.module.fail_json(msg=msg)
def get_filters(self, filters):
"""Get the filters to be applied"""
filter_dict = {}
for item in filters:
self.validate_filter(item)
f_op = item['filter_operator']
if self.filter_mapping.get(f_op):
f_key = item['filter_key']
f_val = item['filter_value']
if f_key in filter_dict:
# multiple filters on same key
if isinstance(filter_dict[f_key], list):
# prev_val is list, so append new f_val
filter_dict[f_key].append(f_val)
else:
# prev_val is not list,
# so create list with prev_val & f_val
filter_dict[f_key] = [filter_dict[f_key], f_val]
else:
filter_dict[f_key] = f_val
else:
msg = "Given filter operator '{0}' is not supported." \
"supported operators are : '{1}'".format(
f_op,
list(self.filter_mapping.keys()))
LOG.error(msg)
self.module.fail_json(msg=msg)
return filter_dict
def perform_module_operation(self):
""" Perform different actions on info based on user input
in the playbook """
filters = self.module.params['filters']
filter_dict = {}
if filters:
filter_dict = self.get_filters(filters)
LOG.info('filters: %s', filter_dict)
api_version = self.get_api_details()
array_details = self.get_array_details()
sdc = []
sds = []
storage_pool = []
vol = []
snapshot_policy = []
protection_domain = []
device = []
rcgs = []
subset = self.module.params['gather_subset']
if subset is not None:
if 'sdc' in subset:
sdc = self.get_sdc_list(filter_dict=filter_dict)
if 'sds' in subset:
sds = self.get_sds_list(filter_dict=filter_dict)
if 'protection_domain' in subset:
protection_domain = self.get_pd_list(filter_dict=filter_dict)
if 'storage_pool' in subset:
storage_pool = self.get_storage_pool_list(filter_dict=filter_dict)
if 'vol' in subset:
vol = self.get_volumes_list(filter_dict=filter_dict)
if 'snapshot_policy' in subset:
snapshot_policy = self.get_snapshot_policy_list(filter_dict=filter_dict)
if 'device' in subset:
device = self.get_devices_list(filter_dict=filter_dict)
if 'rcg' in subset:
rcgs = self.get_replication_consistency_group_list(filter_dict=filter_dict)
self.module.exit_json(
Array_Details=array_details,
API_Version=api_version,
SDCs=sdc,
SDSs=sds,
Storage_Pools=storage_pool,
Volumes=vol,
Snapshot_Policies=snapshot_policy,
Protection_Domains=protection_domain,
Devices=device,
Replication_Consistency_Groups=rcgs
)
def result_list(entity):
""" Get the name and id associated with the PowerFlex entities """
result = []
if entity:
LOG.info('Successfully listed.')
for item in entity:
if item['name']:
result.append(item)
else:
result.append({"id": item['id']})
return result
else:
return None
def get_powerflex_info_parameters():
"""This method provides parameters required for the ansible
info module on powerflex"""
return dict(
gather_subset=dict(type='list', required=False, elements='str',
choices=['vol', 'storage_pool',
'protection_domain', 'sdc', 'sds',
'snapshot_policy', 'device', 'rcg']),
filters=dict(type='list', required=False, elements='dict',
options=dict(filter_key=dict(type='str', required=True, no_log=False),
filter_operator=dict(
type='str', required=True,
choices=['equal']),
filter_value=dict(type='str', required=True)
)))
def main():
""" Create PowerFlex info object and perform action on it
based on user input from playbook"""
obj = PowerFlexInfo()
obj.perform_module_operation()
if __name__ == '__main__':
main()
|