Debian Codegraph @

ansible_collections/dellemc/powerflex/plugins/modules/info.py

raw symbols SCIP
1 # !/usr/bin/python
2
3 # Copyright: (c) 2024, Dell Technologies
4 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
5
6 """Ansible module for Gathering information about Dell Technologies (Dell) PowerFlex"""
7
8 from __future__ import absolute_import, division, print_function
9
10 __metaclass__ = type
11
12 DOCUMENTATION = r'''
13 ---
14 module: info
15
16 version_added: '1.0.0'
17
18 short_description: Gathering information about Dell PowerFlex
19
20 description:
21 - Gathering information about Dell PowerFlex storage system includes
22 getting the api details, list of volumes, SDSs, SDCs, storage pools,
23 protection domains, snapshot policies, and devices.
24 - Gathering information about Dell PowerFlex Manager includes getting the
25 list of managed devices, deployments, service templates and firmware repository.
26
27 extends_documentation_fragment:
28 - dellemc.powerflex.powerflex
29
30 author:
31 - Arindam Datta (@dattaarindam) <[email protected]>
32 - Trisha Datta (@trisha-dell) <[email protected]>
33 - Jennifer John (@Jennifer-John) <[email protected]>
34 - Felix Stephen (@felixs88) <[email protected]>
35
36 options:
37 gather_subset:
38 description:
39 - List of string variables to specify the PowerFlex storage system
40 entities for which information is required.
41 - Volumes - C(vol).
42 - Storage pools - C(storage_pool).
43 - Protection domains - C(protection_domain).
44 - SDCs - C(sdc).
45 - SDSs - C(sds).
46 - Snapshot policies - C(snapshot_policy).
47 - Devices - C(device).
48 - Replication consistency groups - C(rcg).
49 - Replication pairs - C(replication_pair).
50 - Fault Sets - C(fault_set).
51 - Service templates - C(service_template).
52 - Managed devices - C(managed_device).
53 - Deployments - C(deployment).
54 - FirmwareRepository - C(firmware_repository).
55 - NVMe host - C(nvme_host)
56 - NVMe Storage Data Target - C(sdt).
57 choices: [vol, storage_pool, protection_domain, sdc, sds,
58 snapshot_policy, device, rcg, replication_pair,
59 fault_set, service_template, managed_device, deployment, firmware_repository,
60 nvme_host, sdt]
61 type: list
62 elements: str
63 filters:
64 description:
65 - List of filters to support filtered output for storage entities.
66 - Each filter is a list of I(filter_key), I(filter_operator), I(filter_value).
67 - Supports passing of multiple filters.
68 type: list
69 elements: dict
70 suboptions:
71 filter_key:
72 description:
73 - Name identifier of the filter.
74 type: str
75 required: true
76 filter_operator:
77 description:
78 - Operation to be performed on filter key.
79 - Choice C(contains) is supported for I(gather_subset) keys C(service_template), C(managed_device),
80 C(deployment), C(firmware_repository).
81 type: str
82 choices: [equal, contains]
83 required: true
84 filter_value:
85 description:
86 - Value of the filter key.
87 type: str
88 required: true
89 limit:
90 description:
91 - Page limit.
92 - Supported for I(gather_subset) keys C(service_template), C(managed_device), C(deployment), C(firmware_repository).
93 type: int
94 default: 50
95 offset:
96 description:
97 - Pagination offset.
98 - Supported for I(gather_subset) keys C(service_template), C(managed_device), C(deployment), C(firmware_repository).
99 type: int
100 default: 0
101 sort:
102 description:
103 - Sort the returned components based on specified field.
104 - Supported for I(gather_subset) keys C(service_template), C(managed_device), C(deployment), C(firmware_repository).
105 - The supported sort keys for the I(gather_subset) can be referred from PowerFlex Manager API documentation in U(https://developer.dell.com).
106 type: str
107 include_devices:
108 description:
109 - Include devices in response.
110 - Applicable when I(gather_subset) is C(deployment).
111 type: bool
112 default: true
113 include_template:
114 description:
115 - Include service templates in response.
116 - Applicable when I(gather_subset) is C(deployment).
117 type: bool
118 default: true
119 full:
120 description:
121 - Specify if response is full or brief.
122 - Applicable when I(gather_subset) is C(deployment), C(service_template).
123 - For C(deployment) specify to use full templates including resources in response.
124 type: bool
125 default: false
126 include_attachments:
127 description:
128 - Include attachments.
129 - Applicable when I(gather_subset) is C(service_template).
130 type: bool
131 default: true
132 include_related:
133 description:
134 - Include related entities.
135 - Applicable when I(gather_subset) is C(firmware_repository).
136 type: bool
137 default: false
138 version_added: 2.3.0
139 include_bundles:
140 description:
141 - Include software bundle entities.
142 - Applicable when I(gather_subset) is C(firmware_repository).
143 type: bool
144 default: false
145 version_added: 2.3.0
146 include_components:
147 description:
148 - Include software component entities.
149 - Applicable when I(gather_subset) is C(firmware_repository).
150 type: bool
151 default: false
152 version_added: 2.3.0
153 notes:
154 - The I(check_mode) is supported.
155 - The supported filter keys for the I(gather_subset) can be referred from PowerFlex Manager API documentation in U(https://developer.dell.com).
156 - The I(filter), I(sort), I(limit) and I(offset) options will be ignored when more than one I(gather_subset) is specified along with
157 C(service_template), C(managed_device), C(deployment) or C(firmware_repository).
158 '''
159
160 EXAMPLES = r'''
161 - name: Get detailed list of PowerFlex entities
162 dellemc.powerflex.info:
163 hostname: "{{ hostname }}"
164 username: "{{ username }}"
165 password: "{{ password }}"
166 validate_certs: "{{ validate_certs }}"
167 gather_subset:
168 - vol
169 - storage_pool
170 - protection_domain
171 - sdc
172 - sds
173 - snapshot_policy
174 - device
175 - rcg
176 - replication_pair
177 - fault_set
178 - nvme_host
179 - sdt
180
181 - name: Get a subset list of PowerFlex volumes
182 dellemc.powerflex.info:
183 hostname: "{{ hostname }}"
184 username: "{{ username }}"
185 password: "{{ password }}"
186 validate_certs: "{{ validate_certs }}"
187 gather_subset:
188 - vol
189 filters:
190 - filter_key: "name"
191 filter_operator: "equal"
192 filter_value: "ansible_test"
193
194 - name: Get deployment and resource provisioning info
195 dellemc.powerflex.info:
196 hostname: "{{ hostname }}"
197 username: "{{ username }}"
198 password: "{{ password }}"
199 validate_certs: "{{ validate_certs }}"
200 gather_subset:
201 - managed_device
202 - deployment
203 - service_template
204
205 - name: Get deployment with filter, sort, pagination
206 dellemc.powerflex.info:
207 hostname: "{{ hostname }}"
208 username: "{{ username }}"
209 password: "{{ password }}"
210 validate_certs: "{{ validate_certs }}"
211 gather_subset:
212 - deployment
213 filters:
214 - filter_key: "name"
215 filter_operator: "contains"
216 filter_value: "partial"
217 sort: name
218 limit: 10
219 offset: 10
220 include_devices: true
221 include_template: true
222
223 - name: Get the list of firmware repository.
224 dellemc.powerflex.info:
225 hostname: "{{ hostname }}"
226 username: "{{ username }}"
227 password: "{{ password }}"
228 validate_certs: "{{ validate_certs }}"
229 gather_subset:
230 - firmware_repository
231
232 - name: Get the list of firmware repository
233 dellemc.powerflex.info:
234 hostname: "{{ hostname }}"
235 username: "{{ username }}"
236 password: "{{ password }}"
237 validate_certs: "{{ validate_certs }}"
238 gather_subset:
239 - firmware_repository
240 include_related: true
241 include_bundles: true
242 include_components: true
243
244 - name: Get the list of firmware repository with filter
245 dellemc.powerflex.info:
246 hostname: "{{ hostname }}"
247 username: "{{ username }}"
248 password: "{{ password }}"
249 validate_certs: "{{ validate_certs }}"
250 gather_subset:
251 - firmware_repository
252 filters:
253 - filter_key: "createdBy"
254 filter_operator: "equal"
255 filter_value: "admin"
256 sort: createdDate
257 limit: 10
258 include_related: true
259 include_bundles: true
260 include_components: true
261 register: result_repository_out
262
263 - name: Get the list of available firmware repository
264 ansible.builtin.debug:
265 msg: "{{ result_repository_out.FirmwareRepository | selectattr('state', 'equalto', 'available') }}"
266
267 - name: Get the list of software components in the firmware repository
268 ansible.builtin.debug:
269 msg: "{{ result_repository_out.FirmwareRepository |
270 selectattr('id', 'equalto', '8aaa80788b7') | map(attribute='softwareComponents') | flatten }}"
271
272 - name: Get the list of software bundles in the firmware repository
273 ansible.builtin.debug:
274 msg: "{{ result_repository_out.FirmwareRepository |
275 selectattr('id', 'equalto', '8aaa80788b7') | map(attribute='softwareBundles') | flatten }}"
276
277 - name: Get the list of NVMe hosts
278 dellemc.powerflex.info:
279 hostname: "{{ hostname }}"
280 username: "{{ username }}"
281 password: "{{ password }}"
282 validate_certs: "{{ validate_certs }}"
283 gather_subset:
284 - nvme_host
285 filters:
286 - filter_key: "name"
287 filter_operator: "equal"
288 filter_value: "ansible_test"
289
290 - name: Get the list of NVMe Storage Data Target
291 dellemc.powerflex.info:
292 hostname: "{{ hostname }}"
293 username: "{{ username }}"
294 password: "{{ password }}"
295 validate_certs: "{{ validate_certs }}"
296 gather_subset:
297 - sdt
298 '''
299
300 RETURN = r'''
301 changed:
302 description: Whether or not the resource has changed.
303 returned: always
304 type: bool
305 sample: 'false'
306 Array_Details:
307 description: System entities of PowerFlex storage array.
308 returned: always
309 type: dict
310 contains:
311 addressSpaceUsage:
312 description: Address space usage.
313 type: str
314 authenticationMethod:
315 description: Authentication method.
316 type: str
317 capacityAlertCriticalThresholdPercent:
318 description: Capacity alert critical threshold percentage.
319 type: int
320 capacityAlertHighThresholdPercent:
321 description: Capacity alert high threshold percentage.
322 type: int
323 capacityTimeLeftInDays:
324 description: Capacity time left in days.
325 type: str
326 cliPasswordAllowed:
327 description: CLI password allowed.
328 type: bool
329 daysInstalled:
330 description: Days installed.
331 type: int
332 defragmentationEnabled:
333 description: Defragmentation enabled.
334 type: bool
335 enterpriseFeaturesEnabled:
336 description: Enterprise features enabled.
337 type: bool
338 id:
339 description: The ID of the system.
340 type: str
341 installId:
342 description: installation Id.
343 type: str
344 isInitialLicense:
345 description: Initial license.
346 type: bool
347 lastUpgradeTime:
348 description: Last upgrade time.
349 type: int
350 managementClientSecureCommunicationEnabled:
351 description: Management client secure communication enabled.
352 type: bool
353 maxCapacityInGb:
354 description: Maximum capacity in GB.
355 type: dict
356 mdmCluster:
357 description: MDM cluster details.
358 type: dict
359 mdmExternalPort:
360 description: MDM external port.
361 type: int
362 mdmManagementPort:
363 description: MDM management port.
364 type: int
365 mdmSecurityPolicy:
366 description: MDM security policy.
367 type: str
368 showGuid:
369 description: Show guid.
370 type: bool
371 swid:
372 description: SWID.
373 type: str
374 systemVersionName:
375 description: System version and name.
376 type: str
377 tlsVersion:
378 description: TLS version.
379 type: str
380 upgradeState:
381 description: Upgrade state.
382 type: str
383 sample: {
384 "addressSpaceUsage": "Normal",
385 "authenticationMethod": "Native",
386 "capacityAlertCriticalThresholdPercent": 90,
387 "capacityAlertHighThresholdPercent": 80,
388 "capacityTimeLeftInDays": "24",
389 "cliPasswordAllowed": true,
390 "daysInstalled": 66,
391 "defragmentationEnabled": true,
392 "enterpriseFeaturesEnabled": true,
393 "id": "4a54a8ba6df0690f",
394 "installId": "38622771228e56db",
395 "isInitialLicense": true,
396 "lastUpgradeTime": 0,
397 "managementClientSecureCommunicationEnabled": true,
398 "maxCapacityInGb": "Unlimited",
399 "mdmCluster": {
400 "clusterMode": "ThreeNodes",
401 "clusterState": "ClusteredNormal",
402 "goodNodesNum": 3,
403 "goodReplicasNum": 2,
404 "id": "5356091375512217871",
405 "master": {
406 "id": "6101582c2ca8db00",
407 "ips": [
408 "10.47.xxx.xxx"
409 ],
410 "managementIPs": [
411 "10.47.xxx.xxx"
412 ],
413 "name": "node0",
414 "opensslVersion": "OpenSSL 1.0.2k-fips 26 Jan 2017",
415 "port": 9011,
416 "role": "Manager",
417 "status": "Normal",
418 "versionInfo": "R3_6.0.0",
419 "virtualInterfaces": [
420 "ens160"
421 ]
422 },
423 "slaves": [
424 {
425 "id": "23fb724015661901",
426 "ips": [
427 "10.47.xxx.xxx"
428 ],
429 "managementIPs": [
430 "10.47.xxx.xxx"
431 ],
432 "opensslVersion": "OpenSSL 1.0.2k-fips 26 Jan 2017",
433 "port": 9011,
434 "role": "Manager",
435 "status": "Normal",
436 "versionInfo": "R3_6.0.0",
437 "virtualInterfaces": [
438 "ens160"
439 ]
440 }
441 ],
442 "tieBreakers": [
443 {
444 "id": "6ef27eb20d0c1202",
445 "ips": [
446 "10.47.xxx.xxx"
447 ],
448 "managementIPs": [
449 "10.47.xxx.xxx"
450 ],
451 "opensslVersion": "N/A",
452 "port": 9011,
453 "role": "TieBreaker",
454 "status": "Normal",
455 "versionInfo": "R3_6.0.0"
456 }
457 ]
458 },
459 "mdmExternalPort": 7611,
460 "mdmManagementPort": 6611,
461 "mdmSecurityPolicy": "None",
462 "showGuid": true,
463 "swid": "",
464 "systemVersionName": "DellEMC PowerFlex Version: R3_6.0.354",
465 "tlsVersion": "TLSv1.2",
466 "upgradeState": "NoUpgrade"
467 }
468 API_Version:
469 description: API version of PowerFlex API Gateway.
470 returned: always
471 type: str
472 sample: "3.5"
473 Protection_Domains:
474 description: Details of all protection domains.
475 returned: always
476 type: list
477 contains:
478 id:
479 description: protection domain id.
480 type: str
481 name:
482 description: protection domain name.
483 type: str
484 sample: [
485 {
486 "id": "9300e90900000001",
487 "name": "domain2"
488 },
489 {
490 "id": "9300c1f900000000",
491 "name": "domain1"
492 }
493 ]
494 SDCs:
495 description: Details of storage data clients.
496 returned: always
497 type: list
498 contains:
499 id:
500 description: storage data client id.
501 type: str
502 name:
503 description: storage data client name.
504 type: str
505 sample: [
506 {
507 "id": "07335d3d00000006",
508 "name": "LGLAP203"
509 },
510 {
511 "id": "07335d3c00000005",
512 "name": "LGLAP178"
513 },
514 {
515 "id": "0733844a00000003"
516 }
517 ]
518 SDSs:
519 description: Details of storage data servers.
520 returned: always
521 type: list
522 contains:
523 id:
524 description: storage data server id.
525 type: str
526 name:
527 description: storage data server name.
528 type: str
529 sample: [
530 {
531 "id": "8f3bb0cc00000002",
532 "name": "node0"
533 },
534 {
535 "id": "8f3bb0ce00000000",
536 "name": "node1"
537 },
538 {
539 "id": "8f3bb15300000001",
540 "name": "node22"
541 }
542 ]
543 Snapshot_Policies:
544 description: Details of snapshot policies.
545 returned: always
546 type: list
547 contains:
548 id:
549 description: snapshot policy id.
550 type: str
551 name:
552 description: snapshot policy name.
553 type: str
554 sample: [
555 {
556 "id": "2b380c5c00000000",
557 "name": "sample_snap_policy"
558 },
559 {
560 "id": "2b380c5d00000001",
561 "name": "sample_snap_policy_1"
562 }
563 ]
564 Storage_Pools:
565 description: Details of storage pools.
566 returned: always
567 type: list
568 contains:
569 mediaType:
570 description: Type of devices in the storage pool.
571 type: str
572 useRfcache:
573 description: Enable/Disable RFcache on a specific storage pool.
574 type: bool
575 useRmcache:
576 description: Enable/Disable RMcache on a specific storage pool.
577 type: bool
578 id:
579 description: ID of the storage pool under protection domain.
580 type: str
581 name:
582 description: Name of the storage pool under protection domain.
583 type: str
584 protectionDomainId:
585 description: ID of the protection domain in which pool resides.
586 type: str
587 protectionDomainName:
588 description: Name of the protection domain in which pool resides.
589 type: str
590 statistics:
591 description: Statistics details of the storage pool.
592 type: dict
593 contains:
594 capacityInUseInKb:
595 description: Total capacity of the storage pool.
596 type: str
597 unusedCapacityInKb:
598 description: Unused capacity of the storage pool.
599 type: str
600 deviceIds:
601 description: Device Ids of the storage pool.
602 type: list
603 sample: [
604 {
605 "addressSpaceUsage": "Normal",
606 "addressSpaceUsageType": "DeviceCapacityLimit",
607 "backgroundScannerBWLimitKBps": 3072,
608 "backgroundScannerMode": "DataComparison",
609 "bgScannerCompareErrorAction": "ReportAndFix",
610 "bgScannerReadErrorAction": "ReportAndFix",
611 "capacityAlertCriticalThreshold": 90,
612 "capacityAlertHighThreshold": 80,
613 "capacityUsageState": "Normal",
614 "capacityUsageType": "NetCapacity",
615 "checksumEnabled": false,
616 "compressionMethod": "Invalid",
617 "dataLayout": "MediumGranularity",
618 "externalAccelerationType": "None",
619 "fglAccpId": null,
620 "fglExtraCapacity": null,
621 "fglMaxCompressionRatio": null,
622 "fglMetadataSizeXx100": null,
623 "fglNvdimmMetadataAmortizationX100": null,
624 "fglNvdimmWriteCacheSizeInMb": null,
625 "fglOverProvisioningFactor": null,
626 "fglPerfProfile": null,
627 "fglWriteAtomicitySize": null,
628 "fragmentationEnabled": true,
629 "id": "e0d8f6c900000000",
630 "links": [
631 {
632 "href": "/api/instances/StoragePool::e0d8f6c900000000",
633 "rel": "self"
634 },
635 {
636 "href": "/api/instances/StoragePool::e0d8f6c900000000
637 /relationships/Statistics",
638 "rel": "/api/StoragePool/relationship/Statistics"
639 },
640 {
641 "href": "/api/instances/StoragePool::e0d8f6c900000000
642 /relationships/SpSds",
643 "rel": "/api/StoragePool/relationship/SpSds"
644 },
645 {
646 "href": "/api/instances/StoragePool::e0d8f6c900000000
647 /relationships/Volume",
648 "rel": "/api/StoragePool/relationship/Volume"
649 },
650 {
651 "href": "/api/instances/StoragePool::e0d8f6c900000000
652 /relationships/Device",
653 "rel": "/api/StoragePool/relationship/Device"
654 },
655 {
656 "href": "/api/instances/StoragePool::e0d8f6c900000000
657 /relationships/VTree",
658 "rel": "/api/StoragePool/relationship/VTree"
659 },
660 {
661 "href": "/api/instances/ProtectionDomain::9300c1f900000000",
662 "rel": "/api/parent/relationship/protectionDomainId"
663 }
664 ],
665 "statistics": {
666 "BackgroundScannedInMB": 3466920,
667 "activeBckRebuildCapacityInKb": 0,
668 "activeEnterProtectedMaintenanceModeCapacityInKb": 0,
669 "aggregateCompressionLevel": "Uncompressed",
670 "atRestCapacityInKb": 1248256,
671 "backgroundScanCompareErrorCount": 0,
672 "backgroundScanFixedCompareErrorCount": 0,
673 "bckRebuildReadBwc": {
674 "numOccured": 0,
675 "numSeconds": 0,
676 "totalWeightInKb": 0
677 },
678 "bckRebuildWriteBwc": {
679 "numOccured": 0,
680 "numSeconds": 0,
681 "totalWeightInKb": 0
682 },
683 "capacityAvailableForVolumeAllocationInKb": 369098752,
684 "capacityInUseInKb": 2496512,
685 "capacityInUseNoOverheadInKb": 2496512,
686 "capacityLimitInKb": 845783040,
687 "compressedDataCompressionRatio": 0.0,
688 "compressionRatio": 1.0,
689 "currentFglMigrationSizeInKb": 0,
690 "deviceIds": [
691 ],
692 "enterProtectedMaintenanceModeCapacityInKb": 0,
693 "enterProtectedMaintenanceModeReadBwc": {
694 "numOccured": 0,
695 "numSeconds": 0,
696 "totalWeightInKb": 0
697 },
698 "enterProtectedMaintenanceModeWriteBwc": {
699 "numOccured": 0,
700 "numSeconds": 0,
701 "totalWeightInKb": 0
702 },
703 "exitProtectedMaintenanceModeReadBwc": {
704 "numOccured": 0,
705 "numSeconds": 0,
706 "totalWeightInKb": 0
707 },
708 "exitProtectedMaintenanceModeWriteBwc": {
709 "numOccured": 0,
710 "numSeconds": 0,
711 "totalWeightInKb": 0
712 },
713 "exposedCapacityInKb": 0,
714 "failedCapacityInKb": 0,
715 "fwdRebuildReadBwc": {
716 "numOccured": 0,
717 "numSeconds": 0,
718 "totalWeightInKb": 0
719 },
720 "fwdRebuildWriteBwc": {
721 "numOccured": 0,
722 "numSeconds": 0,
723 "totalWeightInKb": 0
724 },
725 "inMaintenanceCapacityInKb": 0,
726 "inMaintenanceVacInKb": 0,
727 "inUseVacInKb": 184549376,
728 "inaccessibleCapacityInKb": 0,
729 "logWrittenBlocksInKb": 0,
730 "maxCapacityInKb": 845783040,
731 "migratingVolumeIds": [
732 ],
733 "migratingVtreeIds": [
734 ],
735 "movingCapacityInKb": 0,
736 "netCapacityInUseInKb": 1248256,
737 "normRebuildCapacityInKb": 0,
738 "normRebuildReadBwc": {
739 "numOccured": 0,
740 "numSeconds": 0,
741 "totalWeightInKb": 0
742 },
743 "normRebuildWriteBwc": {
744 "numOccured": 0,
745 "numSeconds": 0,
746 "totalWeightInKb": 0
747 },
748 "numOfDeviceAtFaultRebuilds": 0,
749 "numOfDevices": 3,
750 "numOfIncomingVtreeMigrations": 0,
751 "numOfVolumes": 8,
752 "numOfVolumesInDeletion": 0,
753 "numOfVtrees": 8,
754 "overallUsageRatio": 73.92289,
755 "pendingBckRebuildCapacityInKb": 0,
756 "pendingEnterProtectedMaintenanceModeCapacityInKb": 0,
757 "pendingExitProtectedMaintenanceModeCapacityInKb": 0,
758 "pendingFwdRebuildCapacityInKb": 0,
759 "pendingMovingCapacityInKb": 0,
760 "pendingMovingInBckRebuildJobs": 0,
761 "persistentChecksumBuilderProgress": 100.0,
762 "persistentChecksumCapacityInKb": 414720,
763 "primaryReadBwc": {
764 "numOccured": 0,
765 "numSeconds": 0,
766 "totalWeightInKb": 0
767 },
768 "primaryReadFromDevBwc": {
769 "numOccured": 0,
770 "numSeconds": 0,
771 "totalWeightInKb": 0
772 },
773 "primaryReadFromRmcacheBwc": {
774 "numOccured": 0,
775 "numSeconds": 0,
776 "totalWeightInKb": 0
777 },
778 "primaryVacInKb": 92274688,
779 "primaryWriteBwc": {
780 "numOccured": 0,
781 "numSeconds": 0,
782 "totalWeightInKb": 0
783 },
784 "protectedCapacityInKb": 2496512,
785 "protectedVacInKb": 184549376,
786 "provisionedAddressesInKb": 2496512,
787 "rebalanceCapacityInKb": 0,
788 "rebalanceReadBwc": {
789 "numOccured": 0,
790 "numSeconds": 0,
791 "totalWeightInKb": 0
792 },
793 "rebalanceWriteBwc": {
794 "numOccured": 0,
795 "numSeconds": 0,
796 "totalWeightInKb": 0
797 },
798 "rfacheReadHit": 0,
799 "rfacheWriteHit": 0,
800 "rfcacheAvgReadTime": 0,
801 "rfcacheAvgWriteTime": 0,
802 "rfcacheIoErrors": 0,
803 "rfcacheIosOutstanding": 0,
804 "rfcacheIosSkipped": 0,
805 "rfcacheReadMiss": 0,
806 "rmPendingAllocatedInKb": 0,
807 "rmPendingThickInKb": 0,
808 "rplJournalCapAllowed": 0,
809 "rplTotalJournalCap": 0,
810 "rplUsedJournalCap": 0,
811 "secondaryReadBwc": {
812 "numOccured": 0,
813 "numSeconds": 0,
814 "totalWeightInKb": 0
815 },
816 "secondaryReadFromDevBwc": {
817 "numOccured": 0,
818 "numSeconds": 0,
819 "totalWeightInKb": 0
820 },
821 "secondaryReadFromRmcacheBwc": {
822 "numOccured": 0,
823 "numSeconds": 0,
824 "totalWeightInKb": 0
825 },
826 "secondaryVacInKb": 92274688,
827 "secondaryWriteBwc": {
828 "numOccured": 0,
829 "numSeconds": 0,
830 "totalWeightInKb": 0
831 },
832 "semiProtectedCapacityInKb": 0,
833 "semiProtectedVacInKb": 0,
834 "snapCapacityInUseInKb": 0,
835 "snapCapacityInUseOccupiedInKb": 0,
836 "snapshotCapacityInKb": 0,
837 "spSdsIds": [
838 "abdfe71b00030001",
839 "abdce71d00040001",
840 "abdde71e00050001"
841 ],
842 "spareCapacityInKb": 84578304,
843 "targetOtherLatency": {
844 "numOccured": 0,
845 "numSeconds": 0,
846 "totalWeightInKb": 0
847 },
848 "targetReadLatency": {
849 "numOccured": 0,
850 "numSeconds": 0,
851 "totalWeightInKb": 0
852 },
853 "targetWriteLatency": {
854 "numOccured": 0,
855 "numSeconds": 0,
856 "totalWeightInKb": 0
857 },
858 "tempCapacityInKb": 0,
859 "tempCapacityVacInKb": 0,
860 "thickCapacityInUseInKb": 0,
861 "thinAndSnapshotRatio": 73.92289,
862 "thinCapacityAllocatedInKm": 184549376,
863 "thinCapacityInUseInKb": 0,
864 "thinUserDataCapacityInKb": 2496512,
865 "totalFglMigrationSizeInKb": 0,
866 "totalReadBwc": {
867 "numOccured": 0,
868 "numSeconds": 0,
869 "totalWeightInKb": 0
870 },
871 "totalWriteBwc": {
872 "numOccured": 0,
873 "numSeconds": 0,
874 "totalWeightInKb": 0
875 },
876 "trimmedUserDataCapacityInKb": 0,
877 "unreachableUnusedCapacityInKb": 0,
878 "unusedCapacityInKb": 758708224,
879 "userDataCapacityInKb": 2496512,
880 "userDataCapacityNoTrimInKb": 2496512,
881 "userDataReadBwc": {
882 "numOccured": 0,
883 "numSeconds": 0,
884 "totalWeightInKb": 0
885 },
886 "userDataSdcReadLatency": {
887 "numOccured": 0,
888 "numSeconds": 0,
889 "totalWeightInKb": 0
890 },
891 "userDataSdcTrimLatency": {
892 "numOccured": 0,
893 "numSeconds": 0,
894 "totalWeightInKb": 0
895 },
896 "userDataSdcWriteLatency": {
897 "numOccured": 0,
898 "numSeconds": 0,
899 "totalWeightInKb": 0
900 },
901 "userDataTrimBwc": {
902 "numOccured": 0,
903 "numSeconds": 0,
904 "totalWeightInKb": 0
905 },
906 "userDataWriteBwc": {
907 "numOccured": 0,
908 "numSeconds": 0,
909 "totalWeightInKb": 0
910 },
911 "volMigrationReadBwc": {
912 "numOccured": 0,
913 "numSeconds": 0,
914 "totalWeightInKb": 0
915 },
916 "volMigrationWriteBwc": {
917 "numOccured": 0,
918 "numSeconds": 0,
919 "totalWeightInKb": 0
920 },
921 "volumeAddressSpaceInKb": 922XXXXX,
922 "volumeAllocationLimitInKb": 3707XXXXX,
923 "volumeIds": [
924 "456afc7900XXXXXXXX"
925 ],
926 "vtreeAddresSpaceInKb": 92274688,
927 "vtreeIds": [
928 "32b1681bXXXXXXXX",
929 ]
930 },
931 "mediaType": "HDD",
932 "name": "pool1",
933 "numOfParallelRebuildRebalanceJobsPerDevice": 2,
934 "persistentChecksumBuilderLimitKb": 3072,
935 "persistentChecksumEnabled": true,
936 "persistentChecksumState": "Protected",
937 "persistentChecksumValidateOnRead": false,
938 "protectedMaintenanceModeIoPriorityAppBwPerDeviceThresholdInKbps": null,
939 "protectedMaintenanceModeIoPriorityAppIopsPerDeviceThreshold": null,
940 "protectedMaintenanceModeIoPriorityBwLimitPerDeviceInKbps": 10240,
941 "protectedMaintenanceModeIoPriorityNumOfConcurrentIosPerDevice": 1,
942 "protectedMaintenanceModeIoPriorityPolicy": "limitNumOfConcurrentIos",
943 "protectedMaintenanceModeIoPriorityQuietPeriodInMsec": null,
944 "protectionDomainId": "9300c1f900000000",
945 "protectionDomainName": "domain1",
946 "rebalanceEnabled": true,
947 "rebalanceIoPriorityAppBwPerDeviceThresholdInKbps": null,
948 "rebalanceIoPriorityAppIopsPerDeviceThreshold": null,
949 "rebalanceIoPriorityBwLimitPerDeviceInKbps": 10240,
950 "rebalanceIoPriorityNumOfConcurrentIosPerDevice": 1,
951 "rebalanceIoPriorityPolicy": "favorAppIos",
952 "rebalanceIoPriorityQuietPeriodInMsec": null,
953 "rebuildEnabled": true,
954 "rebuildIoPriorityAppBwPerDeviceThresholdInKbps": null,
955 "rebuildIoPriorityAppIopsPerDeviceThreshold": null,
956 "rebuildIoPriorityBwLimitPerDeviceInKbps": 10240,
957 "rebuildIoPriorityNumOfConcurrentIosPerDevice": 1,
958 "rebuildIoPriorityPolicy": "limitNumOfConcurrentIos",
959 "rebuildIoPriorityQuietPeriodInMsec": null,
960 "replicationCapacityMaxRatio": 32,
961 "rmcacheWriteHandlingMode": "Cached",
962 "sparePercentage": 10,
963 "useRfcache": false,
964 "useRmcache": false,
965 "vtreeMigrationIoPriorityAppBwPerDeviceThresholdInKbps": null,
966 "vtreeMigrationIoPriorityAppIopsPerDeviceThreshold": null,
967 "vtreeMigrationIoPriorityBwLimitPerDeviceInKbps": 10240,
968 "vtreeMigrationIoPriorityNumOfConcurrentIosPerDevice": 1,
969 "vtreeMigrationIoPriorityPolicy": "favorAppIos",
970 "vtreeMigrationIoPriorityQuietPeriodInMsec": null,
971 "zeroPaddingEnabled": true
972 }
973 ]
974 Volumes:
975 description: Details of volumes.
976 returned: always
977 type: list
978 contains:
979 id:
980 description: The ID of the volume.
981 type: str
982 mappedSdcInfo:
983 description: The details of the mapped SDC.
984 type: dict
985 contains:
986 sdcId:
987 description: ID of the SDC.
988 type: str
989 sdcName:
990 description: Name of the SDC.
991 type: str
992 sdcIp:
993 description: IP of the SDC.
994 type: str
995 accessMode:
996 description: mapping access mode for the specified volume.
997 type: str
998 limitIops:
999 description: IOPS limit for the SDC.
1000 type: int
1001 limitBwInMbps:
1002 description: Bandwidth limit for the SDC.
1003 type: int
1004 name:
1005 description: Name of the volume.
1006 type: str
1007 sizeInKb:
1008 description: Size of the volume in Kb.
1009 type: int
1010 sizeInGb:
1011 description: Size of the volume in Gb.
1012 type: int
1013 storagePoolId:
1014 description: ID of the storage pool in which volume resides.
1015 type: str
1016 storagePoolName:
1017 description: Name of the storage pool in which volume resides.
1018 type: str
1019 protectionDomainId:
1020 description: ID of the protection domain in which volume resides.
1021 type: str
1022 protectionDomainName:
1023 description: Name of the protection domain in which volume resides.
1024 type: str
1025 snapshotPolicyId:
1026 description: ID of the snapshot policy associated with volume.
1027 type: str
1028 snapshotPolicyName:
1029 description: Name of the snapshot policy associated with volume.
1030 type: str
1031 snapshotsList:
1032 description: List of snapshots associated with the volume.
1033 type: str
1034 "statistics":
1035 description: Statistics details of the storage pool.
1036 type: dict
1037 contains:
1038 "numOfChildVolumes":
1039 description: Number of child volumes.
1040 type: int
1041 "numOfMappedSdcs":
1042 description: Number of mapped Sdcs of the volume.
1043 type: int
1044 sample: [
1045 {
1046 "accessModeLimit": "ReadWrite",
1047 "ancestorVolumeId": null,
1048 "autoSnapshotGroupId": null,
1049 "compressionMethod": "Invalid",
1050 "consistencyGroupId": null,
1051 "creationTime": 1661234220,
1052 "dataLayout": "MediumGranularity",
1053 "id": "456afd7XXXXXXX",
1054 "lockedAutoSnapshot": false,
1055 "lockedAutoSnapshotMarkedForRemoval": false,
1056 "managedBy": "ScaleIO",
1057 "mappedSdcInfo": [
1058 {
1059 "accessMode": "ReadWrite",
1060 "isDirectBufferMapping": false,
1061 "limitBwInMbps": 0,
1062 "limitIops": 0,
1063 "sdcId": "c42425cbXXXXX",
1064 "sdcIp": "10.XXX.XX.XX",
1065 "sdcName": null
1066 }
1067 ],
1068 "name": "vol-1",
1069 "notGenuineSnapshot": false,
1070 "originalExpiryTime": 0,
1071 "pairIds": null,
1072 "replicationJournalVolume": false,
1073 "replicationTimeStamp": 0,
1074 "retentionLevels": [
1075 ],
1076 "secureSnapshotExpTime": 0,
1077 "sizeInKb": 8388608,
1078 "snplIdOfAutoSnapshot": null,
1079 "snplIdOfSourceVolume": null,
1080 "statistics": {
1081 "childVolumeIds": [
1082 ],
1083 "descendantVolumeIds": [
1084 ],
1085 "initiatorSdcId": null,
1086 "mappedSdcIds": [
1087 "c42425XXXXXX"
1088 ],
1089 "numOfChildVolumes": 0,
1090 "numOfDescendantVolumes": 0,
1091 "numOfMappedSdcs": 1,
1092 "registrationKey": null,
1093 "registrationKeys": [
1094 ],
1095 "replicationJournalVolume": false,
1096 "replicationState": "UnmarkedForReplication",
1097 "reservationType": "NotReserved",
1098 "rplTotalJournalCap": 0,
1099 "rplUsedJournalCap": 0,
1100 "userDataReadBwc": {
1101 "numOccured": 0,
1102 "numSeconds": 0,
1103 "totalWeightInKb": 0
1104 },
1105 "userDataSdcReadLatency": {
1106 "numOccured": 0,
1107 "numSeconds": 0,
1108 "totalWeightInKb": 0
1109 },
1110 "userDataSdcTrimLatency": {
1111 "numOccured": 0,
1112 "numSeconds": 0,
1113 "totalWeightInKb": 0
1114 },
1115 "userDataSdcWriteLatency": {
1116 "numOccured": 0,
1117 "numSeconds": 0,
1118 "totalWeightInKb": 0
1119 },
1120 "userDataTrimBwc": {
1121 "numOccured": 0,
1122 "numSeconds": 0,
1123 "totalWeightInKb": 0
1124 },
1125 "userDataWriteBwc": {
1126 "numOccured": 0,
1127 "numSeconds": 0,
1128 "totalWeightInKb": 0
1129 }
1130 },
1131 "storagePoolId": "7630a248XXXXXXX",
1132 "timeStampIsAccurate": false,
1133 "useRmcache": false,
1134 "volumeReplicationState": "UnmarkedForReplication",
1135 "volumeType": "ThinProvisioned",
1136 "vtreeId": "32b168bXXXXXX"
1137 }
1138 ]
1139 Devices:
1140 description: Details of devices.
1141 returned: always
1142 type: list
1143 contains:
1144 id:
1145 description: device id.
1146 type: str
1147 name:
1148 description: device name.
1149 type: str
1150 sample: [
1151 {
1152 "id": "b6efa59900000000",
1153 "name": "device230"
1154 },
1155 {
1156 "id": "b6efa5fa00020000",
1157 "name": "device_node0"
1158 },
1159 {
1160 "id": "b7f3a60900010000",
1161 "name": "device22"
1162 }
1163 ]
1164 Replication_Consistency_Groups:
1165 description: Details of rcgs.
1166 returned: always
1167 type: list
1168 contains:
1169 id:
1170 description: The ID of the replication consistency group.
1171 type: str
1172 name:
1173 description: The name of the replication consistency group.
1174 type: str
1175 protectionDomainId:
1176 description: The Protection Domain ID of the replication consistency group.
1177 type: str
1178 peerMdmId:
1179 description: The ID of the peer MDM of the replication consistency group.
1180 type: str
1181 remoteId:
1182 description: The ID of the remote replication consistency group.
1183 type: str
1184 remoteMdmId:
1185 description: The ID of the remote MDM of the replication consistency group.
1186 type: str
1187 currConsistMode:
1188 description: The current consistency mode of the replication consistency group.
1189 type: str
1190 freezeState:
1191 description: The freeze state of the replication consistency group.
1192 type: str
1193 lifetimeState:
1194 description: The Lifetime state of the replication consistency group.
1195 type: str
1196 pauseMode:
1197 description: The Lifetime state of the replication consistency group.
1198 type: str
1199 snapCreationInProgress:
1200 description: Whether the process of snapshot creation of the replication consistency group is in progress or not.
1201 type: bool
1202 lastSnapGroupId:
1203 description: ID of the last snapshot of the replication consistency group.
1204 type: str
1205 lastSnapCreationRc:
1206 description: The return code of the last snapshot of the replication consistency group.
1207 type: int
1208 targetVolumeAccessMode:
1209 description: The access mode of the target volume of the replication consistency group.
1210 type: str
1211 remoteProtectionDomainId:
1212 description: The ID of the remote Protection Domain.
1213 type: str
1214 remoteProtectionDomainName:
1215 description: The Name of the remote Protection Domain.
1216 type: str
1217 failoverType:
1218 description: The type of failover of the replication consistency group.
1219 type: str
1220 failoverState:
1221 description: The state of failover of the replication consistency group.
1222 type: str
1223 activeLocal:
1224 description: Whether the local replication consistency group is active.
1225 type: bool
1226 activeRemote:
1227 description: Whether the remote replication consistency group is active
1228 type: bool
1229 abstractState:
1230 description: The abstract state of the replication consistency group.
1231 type: str
1232 localActivityState:
1233 description: The state of activity of the local replication consistency group.
1234 type: str
1235 remoteActivityState:
1236 description: The state of activity of the remote replication consistency group..
1237 type: str
1238 inactiveReason:
1239 description: The reason for the inactivity of the replication consistency group.
1240 type: int
1241 rpoInSeconds:
1242 description: The RPO value of the replication consistency group in seconds.
1243 type: int
1244 replicationDirection:
1245 description: The direction of the replication of the replication consistency group.
1246 type: str
1247 disasterRecoveryState:
1248 description: The state of disaster recovery of the local replication consistency group.
1249 type: str
1250 remoteDisasterRecoveryState:
1251 description: The state of disaster recovery of the remote replication consistency group.
1252 type: str
1253 error:
1254 description: The error code of the replication consistency group.
1255 type: int
1256 type:
1257 description: The type of the replication consistency group.
1258 type: str
1259 sample: {
1260 "protectionDomainId": "b969400500000000",
1261 "peerMdmId": "6c3d94f600000000",
1262 "remoteId": "2130961a00000000",
1263 "remoteMdmId": "0e7a082862fedf0f",
1264 "currConsistMode": "Consistent",
1265 "freezeState": "Unfrozen",
1266 "lifetimeState": "Normal",
1267 "pauseMode": "None",
1268 "snapCreationInProgress": false,
1269 "lastSnapGroupId": "e58280b300000001",
1270 "lastSnapCreationRc": "SUCCESS",
1271 "targetVolumeAccessMode": "NoAccess",
1272 "remoteProtectionDomainId": "4eeb304600000000",
1273 "remoteProtectionDomainName": "domain1",
1274 "failoverType": "None",
1275 "failoverState": "None",
1276 "activeLocal": true,
1277 "activeRemote": true,
1278 "abstractState": "Ok",
1279 "localActivityState": "Active",
1280 "remoteActivityState": "Active",
1281 "inactiveReason": 11,
1282 "rpoInSeconds": 30,
1283 "replicationDirection": "LocalToRemote",
1284 "disasterRecoveryState": "None",
1285 "remoteDisasterRecoveryState": "None",
1286 "error": 65,
1287 "name": "test_rcg",
1288 "type": "User",
1289 "id": "aadc17d500000000"
1290 }
1291 Replication_pairs:
1292 description: Details of the replication pairs.
1293 returned: Always
1294 type: list
1295 contains:
1296 id:
1297 description: The ID of the replication pair.
1298 type: str
1299 name:
1300 description: The name of the replication pair.
1301 type: str
1302 remoteId:
1303 description: The ID of the remote replication pair.
1304 type: str
1305 localVolumeId:
1306 description: The ID of the local volume.
1307 type: str
1308 replicationConsistencyGroupId:
1309 description: The ID of the replication consistency group.
1310 type: str
1311 copyType:
1312 description: The copy type of the replication pair.
1313 type: str
1314 initialCopyState:
1315 description: The inital copy state of the replication pair.
1316 type: str
1317 localActivityState:
1318 description: The state of activity of the local replication pair.
1319 type: str
1320 remoteActivityState:
1321 description: The state of activity of the remote replication pair.
1322 type: str
1323 sample: {
1324 "copyType": "OnlineCopy",
1325 "id": "23aa0bc900000001",
1326 "initialCopyPriority": -1,
1327 "initialCopyState": "Done",
1328 "lifetimeState": "Normal",
1329 "localActivityState": "RplEnabled",
1330 "localVolumeId": "e2bc1fab00000008",
1331 "name": null,
1332 "peerSystemName": null,
1333 "remoteActivityState": "RplEnabled",
1334 "remoteCapacityInMB": 8192,
1335 "remoteId": "a058446700000001",
1336 "remoteVolumeId": "1cda7af20000000d",
1337 "remoteVolumeName": "vol",
1338 "replicationConsistencyGroupId": "e2ce036b00000002",
1339 "userRequestedPauseTransmitInitCopy": false
1340 }
1341 Fault_Sets:
1342 description: Details of fault sets.
1343 returned: always
1344 type: list
1345 contains:
1346 protectionDomainId:
1347 description: The ID of the protection domain.
1348 type: str
1349 name:
1350 description: device name.
1351 type: str
1352 id:
1353 description: device id.
1354 type: str
1355 sample: [
1356 {
1357 "protectionDomainId": "da721a8300000000",
1358 "protectionDomainName": "fault_set_1",
1359 "name": "at1zbs1t6cp2sds1d1fs1",
1360 "SDS": [],
1361 "id": "eb44b70500000000",
1362 "links": [
1363 { "rel": "self", "href": "/api/instances/FaultSet::eb44b70500000000" },
1364 {
1365 "rel": "/api/FaultSet/relationship/Statistics",
1366 "href": "/api/instances/FaultSet::eb44b70500000000/relationships/Statistics"
1367 },
1368 {
1369 "rel": "/api/FaultSet/relationship/Sds",
1370 "href": "/api/instances/FaultSet::eb44b70500000000/relationships/Sds"
1371 },
1372 {
1373 "rel": "/api/parent/relationship/protectionDomainId",
1374 "href": "/api/instances/ProtectionDomain::da721a8300000000"
1375 }
1376 ]
1377 },
1378 {
1379 "protectionDomainId": "da721a8300000000",
1380 "protectionDomainName": "fault_set_2",
1381 "name": "at1zbs1t6cp2sds1d1fs3",
1382 "SDS": [],
1383 "id": "eb44b70700000002",
1384 "links": [
1385 { "rel": "self", "href": "/api/instances/FaultSet::eb44b70700000002" },
1386 {
1387 "rel": "/api/FaultSet/relationship/Statistics",
1388 "href": "/api/instances/FaultSet::eb44b70700000002/relationships/Statistics"
1389 },
1390 {
1391 "rel": "/api/FaultSet/relationship/Sds",
1392 "href": "/api/instances/FaultSet::eb44b70700000002/relationships/Sds"
1393 },
1394 {
1395 "rel": "/api/parent/relationship/protectionDomainId",
1396 "href": "/api/instances/ProtectionDomain::da721a8300000000"
1397 }
1398 ]
1399 }
1400 ]
1401 ManagedDevices:
1402 description: Details of all devices from inventory.
1403 returned: when I(gather_subset) is I(managed_device)
1404 type: list
1405 contains:
1406 deviceType:
1407 description: Device Type.
1408 type: str
1409 serviceTag:
1410 description: Service Tag.
1411 type: str
1412 serverTemplateId:
1413 description: The ID of the server template.
1414 type: str
1415 state:
1416 description: The state of the device.
1417 type: str
1418 managedState:
1419 description: The managed state of the device.
1420 type: str
1421 compliance:
1422 description: The compliance state of the device.
1423 type: str
1424 systemId:
1425 description: The system ID.
1426 type: str
1427 sample: [{
1428 "refId": "softwareOnlyServer-10.1.1.1",
1429 "refType": null,
1430 "ipAddress": "10.1.1.1",
1431 "currentIpAddress": "10.1.1.1",
1432 "serviceTag": "VMware-42 15 a5 f9 65 e6 63 0e-36 79 59 73 7b 3a 68 cd-SW",
1433 "model": "VMware Virtual Platform",
1434 "deviceType": "SoftwareOnlyServer",
1435 "discoverDeviceType": "SOFTWAREONLYSERVER_CENTOS",
1436 "displayName": "vpi1011-c1n1",
1437 "managedState": "UNMANAGED",
1438 "state": "READY",
1439 "inUse": false,
1440 "serviceReferences": [],
1441 "statusMessage": null,
1442 "firmwareName": "Default Catalog - PowerFlex 4.5.0.0",
1443 "customFirmware": false,
1444 "needsAttention": false,
1445 "manufacturer": "VMware, Inc.",
1446 "systemId": null,
1447 "health": "RED",
1448 "healthMessage": "Inventory run failed.",
1449 "operatingSystem": "N/A",
1450 "numberOfCPUs": 0,
1451 "cpuType": null,
1452 "nics": 0,
1453 "memoryInGB": 0,
1454 "infraTemplateDate": null,
1455 "infraTemplateId": null,
1456 "serverTemplateDate": null,
1457 "serverTemplateId": null,
1458 "inventoryDate": null,
1459 "complianceCheckDate": "2024-02-05T18:31:31.213+00:00",
1460 "discoveredDate": "2024-02-05T18:31:30.992+00:00",
1461 "deviceGroupList": {
1462 "paging": null,
1463 "deviceGroup": [
1464 {
1465 "link": null,
1466 "groupSeqId": -1,
1467 "groupName": "Global",
1468 "groupDescription": null,
1469 "createdDate": null,
1470 "createdBy": "admin",
1471 "updatedDate": null,
1472 "updatedBy": null,
1473 "managedDeviceList": null,
1474 "groupUserList": null
1475 }
1476 ]
1477 },
1478 "detailLink": {
1479 "title": "softwareOnlyServer-10.1.1.1",
1480 "href": "/AsmManager/ManagedDevice/softwareOnlyServer-10.1.1.1",
1481 "rel": "describedby",
1482 "type": null
1483 },
1484 "credId": "bc97cefb-5eb4-4c20-8e39-d1a2b809c9f5",
1485 "compliance": "NONCOMPLIANT",
1486 "failuresCount": 0,
1487 "chassisId": null,
1488 "parsedFacts": null,
1489 "config": null,
1490 "hostname": "vpi1011-c1n1",
1491 "osIpAddress": null,
1492 "osAdminCredential": null,
1493 "osImageType": null,
1494 "lastJobs": null,
1495 "puppetCertName": "red_hat-10.1.1.1",
1496 "svmAdminCredential": null,
1497 "svmName": null,
1498 "svmIpAddress": null,
1499 "svmImageType": null,
1500 "flexosMaintMode": 0,
1501 "esxiMaintMode": 0,
1502 "vmList": []
1503 }]
1504 Deployments:
1505 description: Details of all deployments.
1506 returned: when I(gather_subset) is I(deployment)
1507 type: list
1508 contains:
1509 id:
1510 description: Deployment ID.
1511 type: str
1512 deploymentName:
1513 description: Deployment name.
1514 type: str
1515 status:
1516 description: The status of deployment.
1517 type: str
1518 firmwareRepository:
1519 description: The firmware repository.
1520 type: dict
1521 contains:
1522 signature:
1523 description: The signature details.
1524 type: str
1525 downloadStatus:
1526 description: The download status.
1527 type: str
1528 rcmapproved:
1529 description: If RCM approved.
1530 type: bool
1531 sample: [{
1532 "id": "8aaa80658cd602e0018cda8b257f78ce",
1533 "deploymentName": "Test-Update - K",
1534 "deploymentDescription": "Test-Update - K",
1535 "deploymentValid": null,
1536 "retry": false,
1537 "teardown": false,
1538 "teardownAfterCancel": false,
1539 "removeService": false,
1540 "createdDate": "2024-01-05T16:53:21.407+00:00",
1541 "createdBy": "admin",
1542 "updatedDate": "2024-02-11T17:00:05.657+00:00",
1543 "updatedBy": "system",
1544 "deploymentScheduledDate": null,
1545 "deploymentStartedDate": "2024-01-05T16:53:22.886+00:00",
1546 "deploymentFinishedDate": null,
1547 "serviceTemplate": {
1548 "id": "8aaa80658cd602e0018cda8b257f78ce",
1549 "templateName": "block-only (8aaa80658cd602e0018cda8b257f78ce)",
1550 "templateDescription": "Storage - Software Only deployment",
1551 "templateType": "VxRack FLEX",
1552 "templateVersion": "4.5.0.0",
1553 "templateValid": {
1554 "valid": true,
1555 "messages": []
1556 },
1557 "originalTemplateId": "c44cb500-020f-4562-9456-42ec1eb5f9b2",
1558 "templateLocked": false,
1559 "draft": false,
1560 "inConfiguration": false,
1561 "createdDate": "2024-01-05T16:53:22.083+00:00",
1562 "createdBy": null,
1563 "updatedDate": "2024-02-09T06:00:09.602+00:00",
1564 "lastDeployedDate": null,
1565 "updatedBy": null,
1566 "components": [
1567 {
1568 "id": "6def7edd-bae2-4420-93bf-9ceb051bbb65",
1569 "componentID": "component-scaleio-gateway-1",
1570 "identifier": null,
1571 "componentValid": {
1572 "valid": true,
1573 "messages": []
1574 },
1575 "puppetCertName": "scaleio-block-legacy-gateway",
1576 "osPuppetCertName": null,
1577 "name": "block-legacy-gateway",
1578 "type": "SCALEIO",
1579 "subType": "STORAGEONLY",
1580 "teardown": false,
1581 "helpText": null,
1582 "managementIpAddress": null,
1583 "configFile": null,
1584 "serialNumber": null,
1585 "asmGUID": "scaleio-block-legacy-gateway",
1586 "relatedComponents": {
1587 "625b0e17-9b91-4bc0-864c-d0111d42d8d0": "Node (Software Only)",
1588 "961a59eb-80c3-4a3a-84b7-2101e9831527": "Node (Software Only)-2",
1589 "bca710a5-7cdf-481e-b729-0b53e02873ee": "Node (Software Only)-3"
1590 },
1591 "resources": [],
1592 "refId": null,
1593 "cloned": false,
1594 "clonedFromId": null,
1595 "manageFirmware": false,
1596 "brownfield": false,
1597 "instances": 1,
1598 "clonedFromAsmGuid": null,
1599 "ip": null
1600 }
1601 ],
1602 "category": "block-only",
1603 "allUsersAllowed": true,
1604 "assignedUsers": [],
1605 "manageFirmware": true,
1606 "useDefaultCatalog": false,
1607 "firmwareRepository": null,
1608 "licenseRepository": null,
1609 "configuration": null,
1610 "serverCount": 3,
1611 "storageCount": 1,
1612 "clusterCount": 1,
1613 "serviceCount": 0,
1614 "switchCount": 0,
1615 "vmCount": 0,
1616 "sdnasCount": 0,
1617 "brownfieldTemplateType": "NONE",
1618 "networks": [
1619 {
1620 "id": "8aaa80648cd5fb9b018cda46e4e50000",
1621 "name": "mgmt",
1622 "description": "",
1623 "type": "SCALEIO_MANAGEMENT",
1624 "vlanId": 850,
1625 "static": true,
1626 "staticNetworkConfiguration": {
1627 "gateway": "10.1.1.1",
1628 "subnet": "1.1.1.0",
1629 "primaryDns": "10.1.1.1",
1630 "secondaryDns": "10.1.1.1",
1631 "dnsSuffix": null,
1632 "ipRange": [
1633 {
1634 "id": "8aaa80648cd5fb9b018cda46e5080001",
1635 "startingIp": "10.1.1.1",
1636 "endingIp": "10.1.1.1",
1637 "role": null
1638 }
1639 ],
1640 "ipAddress": null,
1641 "staticRoute": null
1642 },
1643 "destinationIpAddress": "10.1.1.1"
1644 }
1645 ],
1646 "blockServiceOperationsMap": {
1647 "scaleio-block-legacy-gateway": {
1648 "blockServiceOperationsMap": {}
1649 }
1650 }
1651 },
1652 "scheduleDate": null,
1653 "status": "complete",
1654 "compliant": true,
1655 "deploymentDevice": [
1656 {
1657 "refId": "scaleio-block-legacy-gateway",
1658 "refType": null,
1659 "logDump": null,
1660 "status": null,
1661 "statusEndTime": null,
1662 "statusStartTime": null,
1663 "deviceHealth": "GREEN",
1664 "healthMessage": "OK",
1665 "compliantState": "COMPLIANT",
1666 "brownfieldStatus": "NOT_APPLICABLE",
1667 "deviceType": "scaleio",
1668 "deviceGroupName": null,
1669 "ipAddress": "block-legacy-gateway",
1670 "currentIpAddress": "10.1.1.1",
1671 "serviceTag": "block-legacy-gateway",
1672 "componentId": null,
1673 "statusMessage": null,
1674 "model": "PowerFlex Gateway",
1675 "cloudLink": false,
1676 "dasCache": false,
1677 "deviceState": "READY",
1678 "puppetCertName": "scaleio-block-legacy-gateway",
1679 "brownfield": false
1680 }
1681 ],
1682 "vms": null,
1683 "updateServerFirmware": true,
1684 "useDefaultCatalog": false,
1685 "firmwareRepository": {
1686 "id": "8aaa80658cd602e0018cd996a1c91bdc",
1687 "name": "Intelligent Catalog 45.373.00",
1688 "sourceLocation": null,
1689 "sourceType": null,
1690 "diskLocation": null,
1691 "filename": null,
1692 "md5Hash": null,
1693 "username": null,
1694 "password": null,
1695 "downloadStatus": null,
1696 "createdDate": null,
1697 "createdBy": null,
1698 "updatedDate": null,
1699 "updatedBy": null,
1700 "defaultCatalog": false,
1701 "embedded": false,
1702 "state": null,
1703 "softwareComponents": [],
1704 "softwareBundles": [],
1705 "deployments": [],
1706 "bundleCount": 0,
1707 "componentCount": 0,
1708 "userBundleCount": 0,
1709 "minimal": false,
1710 "downloadProgress": 0,
1711 "extractProgress": 0,
1712 "fileSizeInGigabytes": null,
1713 "signedKeySourceLocation": null,
1714 "signature": null,
1715 "custom": false,
1716 "needsAttention": false,
1717 "jobId": null,
1718 "rcmapproved": false
1719 },
1720 "firmwareRepositoryId": "8aaa80658cd602e0018cd996a1c91bdc",
1721 "licenseRepository": null,
1722 "licenseRepositoryId": null,
1723 "individualTeardown": false,
1724 "deploymentHealthStatusType": "green",
1725 "assignedUsers": [],
1726 "allUsersAllowed": true,
1727 "owner": "admin",
1728 "noOp": false,
1729 "firmwareInit": false,
1730 "disruptiveFirmware": false,
1731 "preconfigureSVM": false,
1732 "preconfigureSVMAndUpdate": false,
1733 "servicesDeployed": "NONE",
1734 "precalculatedDeviceHealth": null,
1735 "lifecycleModeReasons": [],
1736 "jobDetails": null,
1737 "numberOfDeployments": 0,
1738 "operationType": "NONE",
1739 "operationStatus": null,
1740 "operationData": null,
1741 "deploymentValidationResponse": null,
1742 "currentStepCount": null,
1743 "totalNumOfSteps": null,
1744 "currentStepMessage": null,
1745 "customImage": "os_sles",
1746 "originalDeploymentId": null,
1747 "currentBatchCount": null,
1748 "totalBatchCount": null,
1749 "templateValid": true,
1750 "lifecycleMode": false,
1751 "vds": false,
1752 "scaleUp": false,
1753 "brownfield": false,
1754 "configurationChange": false
1755 }]
1756 ServiceTemplates:
1757 description: Details of all service templates.
1758 returned: when I(gather_subset) is I(service_template)
1759 type: list
1760 contains:
1761 templateName:
1762 description: Template name.
1763 type: str
1764 templateDescription:
1765 description: Template description.
1766 type: str
1767 templateType:
1768 description: Template type.
1769 type: str
1770 templateVersion:
1771 description: Template version.
1772 type: str
1773 category:
1774 description: The template category.
1775 type: str
1776 serverCount:
1777 description: Server count.
1778 type: int
1779 sample: [{
1780 "id": "2434144f-7795-4245-a04b-6fcb771697d7",
1781 "templateName": "Storage- 100Gb",
1782 "templateDescription": "Storage Only 4 Node deployment with 100Gb networking",
1783 "templateType": "VxRack FLEX",
1784 "templateVersion": "4.5-213",
1785 "templateValid": {
1786 "valid": true,
1787 "messages": []
1788 },
1789 "originalTemplateId": "ff80808177f880fc0177f883bf1e0027",
1790 "templateLocked": true,
1791 "draft": false,
1792 "inConfiguration": false,
1793 "createdDate": "2024-01-04T19:47:23.534+00:00",
1794 "createdBy": "system",
1795 "updatedDate": null,
1796 "lastDeployedDate": null,
1797 "updatedBy": null,
1798 "components": [
1799 {
1800 "id": "43dec024-85a9-4901-9e8e-fa0d3c417f7b",
1801 "componentID": "component-scaleio-gateway-1",
1802 "identifier": null,
1803 "componentValid": {
1804 "valid": true,
1805 "messages": []
1806 },
1807 "puppetCertName": null,
1808 "osPuppetCertName": null,
1809 "name": "PowerFlex Cluster",
1810 "type": "SCALEIO",
1811 "subType": "STORAGEONLY",
1812 "teardown": false,
1813 "helpText": null,
1814 "managementIpAddress": null,
1815 "configFile": null,
1816 "serialNumber": null,
1817 "asmGUID": null,
1818 "relatedComponents": {
1819 "c5c46733-012c-4dca-af9b-af46d73d045a": "Storage Only Node"
1820 },
1821 "resources": [],
1822 "refId": null,
1823 "cloned": false,
1824 "clonedFromId": null,
1825 "manageFirmware": false,
1826 "brownfield": false,
1827 "instances": 1,
1828 "clonedFromAsmGuid": null,
1829 "ip": null
1830 }
1831 ],
1832 "category": "Sample Templates",
1833 "allUsersAllowed": false,
1834 "assignedUsers": [],
1835 "manageFirmware": true,
1836 "useDefaultCatalog": true,
1837 "firmwareRepository": null,
1838 "licenseRepository": null,
1839 "configuration": null,
1840 "serverCount": 4,
1841 "storageCount": 0,
1842 "clusterCount": 1,
1843 "serviceCount": 0,
1844 "switchCount": 0,
1845 "vmCount": 0,
1846 "sdnasCount": 0,
1847 "brownfieldTemplateType": "NONE",
1848 "networks": [
1849 {
1850 "id": "ff80808177f8823b0177f8bb82d80005",
1851 "name": "flex-data2",
1852 "description": "",
1853 "type": "SCALEIO_DATA",
1854 "vlanId": 105,
1855 "static": true,
1856 "staticNetworkConfiguration": {
1857 "gateway": null,
1858 "subnet": "1.1.1.0",
1859 "primaryDns": null,
1860 "secondaryDns": null,
1861 "dnsSuffix": null,
1862 "ipRange": null,
1863 "ipAddress": null,
1864 "staticRoute": null
1865 },
1866 "destinationIpAddress": "1.1.1.0"
1867 }
1868 ],
1869 "blockServiceOperationsMap": {}
1870 }]
1871 FirmwareRepository:
1872 description: Details of all firmware repository.
1873 returned: when I(gather_subset) is C(firmware_repository)
1874 type: list
1875 contains:
1876 id:
1877 description: ID of the firmware repository.
1878 type: str
1879 name:
1880 description: Name of the firmware repository.
1881 type: str
1882 sourceLocation:
1883 description: Source location of the firmware repository.
1884 type: str
1885 state:
1886 description: State of the firmware repository.
1887 type: str
1888 softwareComponents:
1889 description: Software components of the firmware repository.
1890 type: list
1891 softwareBundles:
1892 description: Software bundles of the firmware repository.
1893 type: list
1894 deployments:
1895 description: Deployments of the firmware repository.
1896 type: list
1897 sample: [{
1898 "id": "8aaa03a78de4b2a5018de662818d000b",
1899 "name": "https://192.168.0.1/artifactory/path/pfxmlogs-bvt-pfmp-swo-upgrade-402-to-451-56.tar.gz",
1900 "sourceLocation": "https://192.168.0.2/artifactory/path/pfxmlogs-bvt-pfmp-swo-upgrade-402-to-451-56.tar.gz",
1901 "sourceType": null,
1902 "diskLocation": "",
1903 "filename": "",
1904 "md5Hash": null,
1905 "username": "",
1906 "password": "",
1907 "downloadStatus": "error",
1908 "createdDate": "2024-02-26T17:07:11.884+00:00",
1909 "createdBy": "admin",
1910 "updatedDate": "2024-03-01T06:21:10.917+00:00",
1911 "updatedBy": "system",
1912 "defaultCatalog": false,
1913 "embedded": false,
1914 "state": "errors",
1915 "softwareComponents": [],
1916 "softwareBundles": [],
1917 "deployments": [],
1918 "bundleCount": 0,
1919 "componentCount": 0,
1920 "userBundleCount": 0,
1921 "minimal": true,
1922 "downloadProgress": 100,
1923 "extractProgress": 0,
1924 "fileSizeInGigabytes": 0.0,
1925 "signedKeySourceLocation": null,
1926 "signature": "Unknown",
1927 "custom": false,
1928 "needsAttention": false,
1929 "jobId": "Job-10d75a23-d801-4fdb-a2d0-7f6389ab75cf",
1930 "rcmapproved": false
1931 }]
1932 NVMe_Hosts:
1933 description: Details of all NVMe hosts.
1934 returned: always
1935 type: list
1936 contains:
1937 hostOsFullType:
1938 description: Full type of the host OS.
1939 type: str
1940 hostType:
1941 description: Type of the host.
1942 type: str
1943 id:
1944 description: ID of the NVMe host.
1945 type: str
1946 installedSoftwareVersionInfo:
1947 description: Installed software version information.
1948 type: str
1949 kernelBuildNumber:
1950 description: Kernel build number.
1951 type: str
1952 kernelVersion:
1953 description: Kernel version.
1954 type: str
1955 links:
1956 description: Links related to the NVMe host.
1957 type: list
1958 contains:
1959 href:
1960 description: Hyperlink reference.
1961 type: str
1962 rel:
1963 description: Relation type.
1964 type: str
1965 max_num_paths:
1966 description: Maximum number of paths per volume. Used to create or modify the NVMe host.
1967 type: int
1968 max_num_sys_ports:
1969 description: Maximum number of ports per protection domain. Used to create or modify the NVMe host.
1970 type: int
1971 mdmConnectionState:
1972 description: MDM connection state.
1973 type: str
1974 mdmIpAddressesCurrent:
1975 description: Current MDM IP addresses.
1976 type: list
1977 name:
1978 description: Name of the NVMe host.
1979 type: str
1980 nqn:
1981 description: NQN of the NVMe host. Used to create, get or modify the NVMe host.
1982 type: str
1983 osType:
1984 description: OS type.
1985 type: str
1986 peerMdmId:
1987 description: Peer MDM ID.
1988 type: str
1989 perfProfile:
1990 description: Performance profile.
1991 type: str
1992 sdcAgentActive:
1993 description: Whether the SDC agent is active.
1994 type: bool
1995 sdcApproved:
1996 description: Whether an SDC has approved access to the system.
1997 type: bool
1998 sdcApprovedIps:
1999 description: SDC approved IPs.
2000 type: list
2001 sdcGuid:
2002 description: SDC GUID.
2003 type: str
2004 sdcIp:
2005 description: SDC IP address.
2006 type: str
2007 sdcIps:
2008 description: SDC IP addresses.
2009 type: list
2010 sdcType:
2011 description: SDC type.
2012 type: str
2013 sdrId:
2014 description: SDR ID.
2015 type: str
2016 sdtId:
2017 description: SDT ID.
2018 type: str
2019 softwareVersionInfo:
2020 description: Software version information.
2021 type: str
2022 systemId:
2023 description: ID of the system.
2024 type: str
2025 versionInfo:
2026 description: Version information.
2027 type: str
2028 sample: [{
2029 "hostOsFullType": "Generic",
2030 "systemId": "f4c3b7f5c48cb00f",
2031 "sdcApproved": null,
2032 "sdcAgentActive": null,
2033 "mdmIpAddressesCurrent": null,
2034 "sdcIp": null,
2035 "sdcIps": null,
2036 "osType": null,
2037 "perfProfile": null,
2038 "peerMdmId": null,
2039 "sdtId": null,
2040 "mdmConnectionState": null,
2041 "softwareVersionInfo": null,
2042 "socketAllocationFailure": null,
2043 "memoryAllocationFailure": null,
2044 "versionInfo": null,
2045 "sdcType": null,
2046 "nqn": "nqn.org.nvmexpress:uuid",
2047 "maxNumPaths": 3,
2048 "maxNumSysPorts": 3,
2049 "sdcGuid": null,
2050 "installedSoftwareVersionInfo": null,
2051 "kernelVersion": null,
2052 "kernelBuildNumber": null,
2053 "sdcApprovedIps": null,
2054 "hostType": "NVMeHost",
2055 "sdrId": null,
2056 "name": "example_nvme_host",
2057 "id": "da8f60fd00010000",
2058 "links": [
2059 {
2060 "rel": "self",
2061 "href": "/api/instances/Host::da8f60fd00010000"
2062 },
2063 {
2064 "rel": "/api/Host/relationship/Volume",
2065 "href": "/api/instances/Host::da8f60fd00010000/relationships/Volume"
2066 },
2067 {
2068 "rel": "/api/Host/relationship/NvmeController",
2069 "href": "/api/instances/Host::da8f60fd00010000/relationships/NvmeController"
2070 },
2071 {
2072 "rel": "/api/parent/relationship/systemId",
2073 "href": "/api/instances/System::f4c3b7f5c48cb00f"
2074 }
2075 ]
2076 }]
2077 sdt:
2078 description: Details of NVMe storage data targets.
2079 returned: when I(gather_subset) is C(sdt)
2080 type: list
2081 contains:
2082 authenticationError:
2083 description: The authentication error details of the SDT object.
2084 type: str
2085 certificateInfo:
2086 description: The certificate information of the SDT object.
2087 type: str
2088 discoveryPort:
2089 description: The discovery port number of the SDT object.
2090 type: int
2091 id:
2092 description: The unique identifier of the SDT object.
2093 type: str
2094 ipList:
2095 description: The list of IP addresses of the SDT object.
2096 type: list
2097 contains:
2098 ip:
2099 description: The IP address of the SDT object.
2100 type: str
2101 role:
2102 description: The role associated with the IP address of the SDT object.
2103 type: str
2104 maintenanceState:
2105 description: The maintenance state of the SDT object.
2106 type: str
2107 mdmConnectionState:
2108 description: The MDM connection state of the SDT object.
2109 type: str
2110 membershipState:
2111 description: The membership state of the SDT object.
2112 type: str
2113 name:
2114 description: The name of the SDT object.
2115 type: str
2116 nvmePort:
2117 description: The NVMe port number of the SDT object.
2118 type: int
2119 nvme_hosts:
2120 description: The list of NVMe hosts associated with the SDT object.
2121 type: list
2122 contains:
2123 controllerId:
2124 description: The controller ID.
2125 type: int
2126 hostId:
2127 description: The host ID associated with the NVMe controller.
2128 type: str
2129 hostIp:
2130 description: The IP address of the host.
2131 type: str
2132 id:
2133 description: The unique identifier of the NVMe controller.
2134 type: str
2135 isAssigned:
2136 description: Indicates if the NVMe controller is assigned.
2137 type: bool
2138 isConnected:
2139 description: Indicates if the NVMe controller is connected.
2140 type: bool
2141 links:
2142 description: Hyperlinks related to the NVMe controller.
2143 type: list
2144 contains:
2145 href:
2146 description: The URL of the link.
2147 type: str
2148 rel:
2149 description: The relation type of the link.
2150 type: str
2151 name:
2152 description: The name of the NVMe controller. Can be null.
2153 type: str
2154 sdtId:
2155 description: The SDT ID associated with the NVMe controller.
2156 type: str
2157 subsystem:
2158 description: The subsystem associated with the NVMe controller.
2159 type: str
2160 sysPortId:
2161 description: The system port ID.
2162 type: int
2163 sysPortIp:
2164 description: The IP address of the system port.
2165 type: str
2166 protectionDomainId:
2167 description: The Protection Domain ID associated with the SDT object.
2168 type: str
2169 sdtState:
2170 description: The state of the SDT object.
2171 type: str
2172 softwareVersionInfo:
2173 description: The software version information of the SDT object.
2174 type: str
2175 storagePort:
2176 description: The storage port number of the SDT object.
2177 type: int
2178 sample: [{
2179 "authenticationError": "None",
2180 "certificateInfo": null,
2181 "discoveryPort": 8009,
2182 "faultSetId": null,
2183 "id": "8bddf18b00000000",
2184 "ipList": [
2185 {
2186 "ip": "10.1.1.1",
2187 "role": "HostOnly"
2188 },
2189 {
2190 "ip": "10.1.1.2",
2191 "role": "StorageOnly"
2192 }
2193 ],
2194 "links": [
2195 {
2196 "href": "/api/instances/Sdt::8bddf18b00000000",
2197 "rel": "self"
2198 },
2199 {
2200 "href": "/api/instances/Sdt::8bddf18b00000000/relationships/Statistics",
2201 "rel": "/api/Sdt/relationship/Statistics"
2202 },
2203 {
2204 "href": "/api/instances/ProtectionDomain::32a39aa600000000",
2205 "rel": "/api/parent/relationship/protectionDomainId"
2206 }
2207 ],
2208 "maintenanceState": "NoMaintenance",
2209 "mdmConnectionState": "Connected",
2210 "membershipState": "Joined",
2211 "name": "Sdt-yulan3-pf460-svm-1",
2212 "nvmePort": 4420,
2213 "nvme_hosts": [
2214 {
2215 "controllerId": 1,
2216 "hostId": "1040d69e00010001",
2217 "hostIp": "10.0.1.1",
2218 "id": "cc00010001000002",
2219 "isAssigned": false,
2220 "isConnected": true,
2221 "links": [
2222 {
2223 "href": "/api/instances/NvmeController::cc00010001000002",
2224 "rel": "self"
2225 }
2226 ],
2227 "name": null,
2228 "sdtId": "8bddf18b00000000",
2229 "subsystem": "Io",
2230 "sysPortId": 0,
2231 "sysPortIp": "10.1.1.1"
2232 }
2233 ],
2234 "persistentDiscoveryControllersNum": 0,
2235 "protectionDomainId": "32a39aa600000000",
2236 "sdtState": "Normal",
2237 "softwareVersionInfo": "R4_5.2100.0",
2238 "storagePort": 12200,
2239 "systemId": "264ec85b3855280f"
2240 }]
2241 '''
2242
2243 from ansible.module_utils.basic import AnsibleModule
2244 from ansible_collections.dellemc.powerflex.plugins.module_utils.storage.dell \
2245 import utils
2246 from ansible_collections.dellemc.powerflex.plugins.module_utils.storage.dell.libraries.powerflex_base \
2247 import powerflex_compatibility
2248 from ansible_collections.dellemc.powerflex.plugins.module_utils.storage.dell.libraries.powerflex_base \
2249 import PowerFlexBase
2250 from ansible_collections.dellemc.powerflex.plugins.module_utils.storage.dell.libraries.configuration \
2251 import Configuration
2252 import re
2253
2254 LOG = utils.get_logger('info')
2255
2256 UNSUPPORTED_SUBSET_FOR_VERSION = 'One or more specified subset is not supported for the PowerFlex version.'
2257 POWERFLEX_MANAGER_GATHER_SUBSET = {'managed_device', 'deployment', 'service_template'}
2258 MIN_SUPPORTED_POWERFLEX_MANAGER_VERSION = 4.0
2259 ERROR_CODES = r'PARSE002|FILTER002|FILTER003'
2260
2261
2262 @powerflex_compatibility(min_ver='3.6', max_ver='5.0', successor='info_v2')
2263 class PowerFlexInfo(PowerFlexBase):
2264 """Class with Info operations"""
2265
2266 filter_mapping = {'equal': 'eq', 'contains': 'co'}
2267
2268 def __init__(self):
2269 """ Define all parameters required by this module"""
2270 argument_spec = get_powerflex_info_parameters()
2271 module_params = {
2272 'argument_spec': argument_spec,
2273 'supports_check_mode': False,
2274 }
2275 self.filter_keys = sorted(
2276 [k for k in argument_spec['filters']['options'].keys()
2277 if 'filter' in k])
2278 super().__init__(AnsibleModule, module_params)
2279 super().check_module_compatibility()
2280
2281 def get_api_details(self):
2282 """ Get api details of the array """
2283 try:
2284 LOG.info('Getting API details ')
2285 api_version = self.powerflex_conn.system.api_version()
2286 return api_version
2287
2288 except Exception as e:
2289 msg = 'Get API details from Powerflex array failed with' \
2290 ' error %s' % (str(e))
2291 LOG.error(msg)
2292 self.module.fail_json(msg=msg)
2293
2294 def get_array_details(self):
2295 """ Get system details of a powerflex array """
2296
2297 try:
2298 LOG.info('Getting array details ')
2299 entity_list = ['addressSpaceUsage', 'authenticationMethod',
2300 'capacityAlertCriticalThresholdPercent',
2301 'capacityAlertHighThresholdPercent',
2302 'capacityTimeLeftInDays', 'cliPasswordAllowed',
2303 'daysInstalled', 'defragmentationEnabled',
2304 'enterpriseFeaturesEnabled', 'id', 'installId',
2305 'isInitialLicense', 'lastUpgradeTime',
2306 'managementClientSecureCommunicationEnabled',
2307 'maxCapacityInGb', 'mdmCluster',
2308 'mdmExternalPort', 'mdmManagementPort',
2309 'mdmSecurityPolicy', 'showGuid', 'swid',
2310 'systemVersionName', 'tlsVersion', 'upgradeState']
2311
2312 sys_list = self.powerflex_conn.system.get()
2313 sys_details_list = []
2314 for sys in sys_list:
2315 sys_details = {}
2316 for entity in entity_list:
2317 if entity in sys.keys():
2318 sys_details.update({entity: sys[entity]})
2319 if sys_details:
2320 sys_details_list.append(sys_details)
2321
2322 return sys_details_list
2323
2324 except Exception as e:
2325 msg = 'Get array details from Powerflex array failed with' \
2326 ' error %s' % (str(e))
2327 LOG.error(msg)
2328 self.module.fail_json(msg=msg)
2329
2330 def get_sdc_list(self, filter_dict=None):
2331 """ Get the list of sdcs on a given PowerFlex storage system """
2332
2333 try:
2334 LOG.info('Getting SDC list ')
2335 if filter_dict:
2336 sdc = self.powerflex_conn.sdc.get(filter_fields=filter_dict)
2337 else:
2338 sdc = self.powerflex_conn.sdc.get()
2339 # filter out NVMe host entities
2340 sdc = [obj for obj in sdc if obj.get('hostType') != 'NVMeHost']
2341 return result_list(sdc)
2342
2343 except Exception as e:
2344 msg = 'Get SDC list from powerflex array failed with' \
2345 ' error %s' % (str(e))
2346 LOG.error(msg)
2347 self.module.fail_json(msg=msg)
2348
2349 def get_nvme_host_list(self, filter_dict=None):
2350 """ Get the list of NVMe hosts on a given PowerFlex storage system """
2351
2352 try:
2353 LOG.info('Getting NVMe hosts list ')
2354 sdc = self.powerflex_conn.sdc.get()
2355 # filter out NVMe host entities
2356 hosts = [obj for obj in sdc if obj.get('hostType') == 'NVMeHost']
2357 # Add name to NVMe hosts without giving name
2358 for host in hosts:
2359 if host.get("name") is None:
2360 host["name"] = f"NVMeHost:{host['id']}"
2361 if filter_dict:
2362 hosts = utils.filter_response(hosts, filter_dict)
2363 return result_list(hosts)
2364
2365 except Exception as e:
2366 msg = 'Get NVMe host list from powerflex array failed with' \
2367 ' error %s' % (str(e))
2368 LOG.error(msg)
2369 self.module.fail_json(msg=msg)
2370
2371 def get_sds_list(self, filter_dict=None):
2372 """ Get the list of sdses on a given PowerFlex storage system """
2373
2374 try:
2375 LOG.info('Getting SDS list ')
2376 if filter_dict:
2377 sds = self.powerflex_conn.sds.get(filter_fields=filter_dict)
2378 else:
2379 sds = self.powerflex_conn.sds.get()
2380 return result_list(sds)
2381
2382 except Exception as e:
2383 msg = 'Get SDS list from powerflex array failed with' \
2384 ' error %s' % (str(e))
2385 LOG.error(msg)
2386 self.module.fail_json(msg=msg)
2387
2388 def get_pd_list(self, filter_dict=None):
2389 """ Get the list of Protection Domains on a given PowerFlex
2390 storage system """
2391
2392 try:
2393 LOG.info('Getting protection domain list ')
2394
2395 if filter_dict:
2396 pd = self.powerflex_conn.protection_domain.get(filter_fields=filter_dict)
2397 else:
2398 pd = self.powerflex_conn.protection_domain.get()
2399 return result_list(pd)
2400
2401 except Exception as e:
2402 msg = 'Get protection domain list from powerflex array failed ' \
2403 'with error %s' % (str(e))
2404 LOG.error(msg)
2405 self.module.fail_json(msg=msg)
2406
2407 def get_storage_pool_list(self, filter_dict=None):
2408 """ Get the list of storage pools on a given PowerFlex storage
2409 system """
2410
2411 try:
2412 LOG.info('Getting storage pool list ')
2413 if filter_dict:
2414 pool = self.powerflex_conn.storage_pool.get(filter_fields=filter_dict)
2415 else:
2416 pool = self.powerflex_conn.storage_pool.get()
2417
2418 if pool:
2419 statistics_map = self.powerflex_conn.utility.get_statistics_for_all_storagepools()
2420 list_of_pool_ids_in_statistics = statistics_map.keys()
2421 for item in pool:
2422 item['statistics'] = statistics_map[item['id']] if item['id'] in list_of_pool_ids_in_statistics else {}
2423 return result_list(pool)
2424
2425 except Exception as e:
2426 msg = 'Get storage pool list from powerflex array failed with' \
2427 ' error %s' % (str(e))
2428 LOG.error(msg)
2429 self.module.fail_json(msg=msg)
2430
2431 def get_replication_consistency_group_list(self, filter_dict=None):
2432 """ Get the list of replication consistency group on a given PowerFlex storage
2433 system """
2434
2435 try:
2436 LOG.info('Getting replication consistency group list ')
2437 if filter_dict:
2438 rcgs = self.powerflex_conn.replication_consistency_group.get(filter_fields=filter_dict)
2439 else:
2440 rcgs = self.powerflex_conn.replication_consistency_group.get()
2441 if rcgs:
2442 api_version = self.powerflex_conn.system.get()[0]['mdmCluster']['master']['versionInfo']
2443 statistics_map = \
2444 self.powerflex_conn.replication_consistency_group.get_all_statistics(
2445 utils.is_version_less(utils.parse_version(api_version), '3.6'))
2446 list_of_rcg_ids_in_statistics = statistics_map.keys()
2447 for rcg in rcgs:
2448 rcg.pop('links', None)
2449 rcg['statistics'] = statistics_map[rcg['id']] if rcg['id'] in list_of_rcg_ids_in_statistics else {}
2450 return result_list(rcgs)
2451
2452 except Exception as e:
2453 msg = 'Get replication consistency group list from powerflex array failed with' \
2454 ' error %s' % (str(e))
2455 LOG.error(msg)
2456 self.module.fail_json(msg=msg)
2457
2458 def get_replication_pair_list(self, filter_dict=None):
2459 """ Get the list of replication pairs on a given PowerFlex storage
2460 system """
2461
2462 try:
2463 LOG.info('Getting replication pair list ')
2464 if filter_dict:
2465 pairs = self.powerflex_conn.replication_pair.get(filter_fields=filter_dict)
2466 else:
2467 pairs = self.powerflex_conn.replication_pair.get()
2468 if pairs:
2469 for pair in pairs:
2470 pair.pop('links', None)
2471 local_volume = self.powerflex_conn.volume.get(filter_fields={'id': pair['localVolumeId']})
2472 if local_volume:
2473 pair['localVolumeName'] = local_volume[0]['name']
2474 pair['replicationConsistencyGroupName'] = \
2475 self.powerflex_conn.replication_consistency_group.get(filter_fields={'id': pair['replicationConsistencyGroupId']})[0]['name']
2476 pair['statistics'] = self.powerflex_conn.replication_pair.get_statistics(pair['id'])
2477 return pairs
2478
2479 except Exception as e:
2480 msg = 'Get replication pair list from powerflex array failed with' \
2481 ' error %s' % (str(e))
2482 LOG.error(msg)
2483 self.module.fail_json(msg=msg)
2484
2485 def get_volumes_list(self, filter_dict=None):
2486 """ Get the list of volumes on a given PowerFlex storage
2487 system """
2488
2489 try:
2490 LOG.info('Getting volumes list ')
2491 if filter_dict:
2492 volumes = self.powerflex_conn.volume.get(filter_fields=filter_dict)
2493 else:
2494 volumes = self.powerflex_conn.volume.get()
2495
2496 if volumes:
2497 statistics_map = self.powerflex_conn.utility.get_statistics_for_all_volumes()
2498 list_of_vol_ids_in_statistics = statistics_map.keys()
2499 for item in volumes:
2500 item['statistics'] = statistics_map[item['id']] if item['id'] in list_of_vol_ids_in_statistics else {}
2501 return result_list(volumes)
2502
2503 except Exception as e:
2504 msg = 'Get volumes list from powerflex array failed with' \
2505 ' error %s' % (str(e))
2506 LOG.error(msg)
2507 self.module.fail_json(msg=msg)
2508
2509 def get_snapshot_policy_list(self, filter_dict=None):
2510 """ Get the list of snapshot schedules on a given PowerFlex storage
2511 system """
2512
2513 try:
2514 LOG.info('Getting snapshot policies list ')
2515 if filter_dict:
2516 snapshot_policies = \
2517 self.powerflex_conn.snapshot_policy.get(
2518 filter_fields=filter_dict)
2519 else:
2520 snapshot_policies = \
2521 self.powerflex_conn.snapshot_policy.get()
2522
2523 if snapshot_policies:
2524 statistics_map = self.powerflex_conn.utility.get_statistics_for_all_snapshot_policies()
2525 list_of_snap_pol_ids_in_statistics = statistics_map.keys()
2526 for item in snapshot_policies:
2527 item['statistics'] = statistics_map[item['id']] if item['id'] in list_of_snap_pol_ids_in_statistics else {}
2528 return result_list(snapshot_policies)
2529
2530 except Exception as e:
2531 msg = 'Get snapshot policies list from powerflex array failed ' \
2532 'with error %s' % (str(e))
2533 LOG.error(msg)
2534 self.module.fail_json(msg=msg)
2535
2536 def get_devices_list(self, filter_dict=None):
2537 """ Get the list of devices on a given PowerFlex storage
2538 system """
2539
2540 try:
2541 LOG.info('Getting device list ')
2542 if filter_dict:
2543 devices = self.powerflex_conn.device.get(filter_fields=filter_dict)
2544 else:
2545 devices = self.powerflex_conn.device.get()
2546
2547 return result_list(devices)
2548
2549 except Exception as e:
2550 msg = 'Get device list from powerflex array failed ' \
2551 'with error %s' % (str(e))
2552 LOG.error(msg)
2553 self.module.fail_json(msg=msg)
2554
2555 def get_fault_sets_list(self, filter_dict=None):
2556 """ Get the list of fault sets on a given PowerFlex storage
2557 system """
2558
2559 try:
2560 LOG.info('Getting fault set list ')
2561 filter_pd = []
2562 if filter_dict:
2563 if 'protectionDomainName' in filter_dict.keys():
2564 filter_pd = filter_dict['protectionDomainName']
2565 del filter_dict['protectionDomainName']
2566 fault_sets = self.powerflex_conn.fault_set.get(filter_fields=filter_dict)
2567 else:
2568 fault_sets = self.powerflex_conn.fault_set.get()
2569
2570 fault_set_final = []
2571 if fault_sets:
2572 for fault_set in fault_sets:
2573 fault_set['protectionDomainName'] = Configuration(self.powerflex_conn, self.module).get_protection_domain(
2574 protection_domain_id=fault_set["protectionDomainId"])["name"]
2575 fault_set["SDS"] = Configuration(self.powerflex_conn, self.module).get_associated_sds(
2576 fault_set_id=fault_set['id'])
2577 fault_set_final.append(fault_set)
2578 fault_sets = []
2579 for fault_set in fault_set_final:
2580 if fault_set['protectionDomainName'] in filter_pd:
2581 fault_sets.append(fault_set)
2582 if len(filter_pd) != 0:
2583 return result_list(fault_sets)
2584 return result_list(fault_set_final)
2585
2586 except Exception as e:
2587 msg = 'Get fault set list from powerflex array failed ' \
2588 'with error %s' % (str(e))
2589 LOG.error(msg)
2590 self.module.fail_json(msg=msg)
2591
2592 def get_managed_devices_list(self):
2593 """ Get the list of managed devices on a given PowerFlex Manager system """
2594 try:
2595 LOG.info('Getting managed devices list ')
2596 devices = self.powerflex_conn.managed_device.get(filters=self.populate_filter_list(),
2597 limit=self.get_param_value('limit'),
2598 offset=self.get_param_value('offset'),
2599 sort=self.get_param_value('sort'))
2600 return devices
2601 except Exception as e:
2602 msg = f'Get managed devices from PowerFlex Manager failed with error {str(e)}'
2603 return self.handle_error_exit(msg)
2604
2605 def get_deployments_list(self):
2606 """ Get the list of deployments on a given PowerFlex Manager system """
2607 try:
2608 LOG.info('Getting deployments list ')
2609 deployments = self.powerflex_conn.deployment.get(filters=self.populate_filter_list(),
2610 sort=self.get_param_value('sort'),
2611 limit=self.get_param_value('limit'),
2612 offset=self.get_param_value('offset'),
2613 include_devices=self.get_param_value('include_devices'),
2614 include_template=self.get_param_value('include_template'),
2615 full=self.get_param_value('full'))
2616 return deployments
2617 except Exception as e:
2618 msg = f'Get deployments from PowerFlex Manager failed with error {str(e)}'
2619 return self.handle_error_exit(msg)
2620
2621 def get_sdt_list(self, filter_dict=None):
2622 """ Get the list of sdt on a given PowerFlex Manager system """
2623 try:
2624 LOG.info('Getting sdt list ')
2625 # Get the list of nvme hosts
2626 associated_hosts = []
2627 nvme_hosts = self.powerflex_conn.sdc.get(filter_fields={'hostType': "NVMeHost"})
2628 for nvme_host in nvme_hosts:
2629 controller = self.powerflex_conn.host.get_related(entity_id=nvme_host.get('id'), related='NvmeController')
2630 associated_hosts.extend(controller)
2631 associated_hosts_map = {controller.get('sdtId'): controller for controller in associated_hosts if controller.get('sdtId') is not None}
2632 if filter_dict:
2633 sdts = self.powerflex_conn.sdt.get(filter_fields=filter_dict)
2634 else:
2635 sdts = self.powerflex_conn.sdt.get()
2636
2637 for sdt in sdts:
2638 sdt['nvme_hosts'] = []
2639 for host in associated_hosts_map.values():
2640 if host.get('sdtId') == sdt.get('id'):
2641 sdt['nvme_hosts'].append(host)
2642
2643 return result_list(sdts)
2644
2645 except Exception as e:
2646 msg = f'Get sdt from PowerFlex Manager failed with error {str(e)}'
2647 LOG.error(msg)
2648 self.module.fail_json(msg=msg)
2649
2650 def get_pagination_params(self):
2651 """ Get the pagination parameters """
2652 return {'limit': self.get_param_value('limit'), 'offset': self.get_param_value('offset'),
2653 'sort': self.get_param_value('sort'), 'filters': self.populate_filter_list()}
2654
2655 def get_firmware_repository_list(self):
2656 """ Get the list of firmware repository on a given PowerFlex Manager system """
2657 try:
2658 LOG.info('Getting firmware repository list ')
2659 firmware_repository = self.powerflex_conn.firmware_repository.get(
2660 **self.get_pagination_params(),
2661 related=self.get_param_value('include_related'),
2662 bundles=self.get_param_value('include_bundles'),
2663 components=self.get_param_value('include_components'))
2664 return firmware_repository
2665 except Exception as e:
2666 msg = f'Get firmware repository from PowerFlex Manager failed with error {str(e)}'
2667 return self.handle_error_exit(msg)
2668
2669 def get_service_templates_list(self):
2670 """ Get the list of service templates on a given PowerFlex Manager system """
2671 try:
2672 LOG.info('Getting service templates list ')
2673 service_templates = self.powerflex_conn.service_template.get(filters=self.populate_filter_list(),
2674 sort=self.get_param_value('sort'),
2675 offset=self.get_param_value('offset'),
2676 limit=self.get_param_value('limit'),
2677 full=self.get_param_value('full'),
2678 include_attachments=self.get_param_value('include_attachments'))
2679 return service_templates
2680 except Exception as e:
2681 msg = f'Get service templates from PowerFlex Manager failed with error {str(e)}'
2682 return self.handle_error_exit(msg)
2683
2684 def handle_error_exit(self, detailed_message):
2685 match = re.search(r"displayMessage=([^']+)", detailed_message)
2686 error_message = match.group(1) if match else detailed_message
2687 LOG.error(error_message)
2688 if re.search(ERROR_CODES, detailed_message):
2689 return []
2690 self.module.fail_json(msg=error_message)
2691
2692 def get_param_value(self, param):
2693 """
2694 Get the value of the given parameter.
2695 Args:
2696 param (str): The parameter to get the value for.
2697 Returns:
2698 The value of the parameter if it is different from the default value,
2699 The value of the parameter if int and greater than 0
2700 otherwise None.
2701 """
2702 if param in ('sort', 'offset', 'limit') and len(self.module.params.get('gather_subset')) > 1:
2703 return None
2704 default_value = self.module.argument_spec.get(param).get('default')
2705 param_value = self.module.params.get(param)
2706 if (default_value != param_value) and (param_value >= 0 if isinstance(param_value, int) else True):
2707 return param_value
2708 return None
2709
2710 def validate_filter(self, filter_dict):
2711 """ Validate given filter_dict """
2712
2713 is_invalid_filter = self.filter_keys != sorted(list(filter_dict))
2714 if is_invalid_filter:
2715 msg = "Filter should have all keys: '{0}'".format(
2716 ", ".join(self.filter_keys))
2717 LOG.error(msg)
2718 self.module.fail_json(msg=msg)
2719
2720 is_invalid_filter = [filter_dict[i] is None for i in filter_dict]
2721 if True in is_invalid_filter:
2722 msg = "Filter keys: '{0}' cannot be None".format(self.filter_keys)
2723 LOG.error(msg)
2724 self.module.fail_json(msg=msg)
2725
2726 def populate_filter_list(self):
2727 """Populate the filter list"""
2728 if len(self.module.params.get('gather_subset')) > 1:
2729 return []
2730 filters = self.module.params.get('filters') or []
2731 return [
2732 f'{self.filter_mapping.get(filter_dict["filter_operator"])},{filter_dict["filter_key"]},{filter_dict["filter_value"]}'
2733 for filter_dict in filters
2734 ]
2735
2736 def get_filters(self, filters):
2737 """Get the filters to be applied"""
2738
2739 filter_dict = {}
2740 for item in filters:
2741 self.validate_filter(item)
2742 f_op = item['filter_operator']
2743 if self.filter_mapping.get(f_op) == self.filter_mapping.get("equal"):
2744 f_key = item['filter_key']
2745 f_val = item['filter_value']
2746 if f_key in filter_dict:
2747 # multiple filters on same key
2748 if isinstance(filter_dict[f_key], list):
2749 # prev_val is list, so append new f_val
2750 filter_dict[f_key].append(f_val)
2751 else:
2752 # prev_val is not list,
2753 # so create list with prev_val & f_val
2754 filter_dict[f_key] = [filter_dict[f_key], f_val]
2755 else:
2756 filter_dict[f_key] = f_val
2757 return filter_dict
2758
2759 def validate_subset(self, api_version, subset):
2760 if float(api_version) < MIN_SUPPORTED_POWERFLEX_MANAGER_VERSION and subset and set(subset).issubset(POWERFLEX_MANAGER_GATHER_SUBSET):
2761 self.module.exit_json(msg=UNSUPPORTED_SUBSET_FOR_VERSION, skipped=True)
2762
2763 def perform_module_operation(self):
2764 """ Perform different actions on info based on user input
2765 in the playbook """
2766
2767 filters = self.module.params['filters']
2768 filter_dict = {}
2769 if filters:
2770 filter_dict = self.get_filters(filters)
2771 LOG.info('filters: %s', filter_dict)
2772
2773 api_version = self.get_api_details()
2774 array_details = self.get_array_details()
2775 subset = self.module.params['gather_subset']
2776 subset_result_filter = {}
2777 subset_result_wo_param = {}
2778 self.validate_subset(api_version, subset)
2779
2780 subset_dict_with_filter = {
2781 "sdc": self.get_sdc_list,
2782 "sds": self.get_sds_list,
2783 "protection_domain": self.get_pd_list,
2784 "storage_pool": self.get_storage_pool_list,
2785 "vol": self.get_volumes_list,
2786 "snapshot_policy": self.get_snapshot_policy_list,
2787 "device": self.get_devices_list,
2788 "rcg": self.get_replication_consistency_group_list,
2789 "replication_pair": self.get_replication_pair_list,
2790 "fault_set": self.get_fault_sets_list,
2791 "nvme_host": self.get_nvme_host_list,
2792 "sdt": self.get_sdt_list,
2793 }
2794
2795 subset_wo_param = {
2796 "managed_device": self.get_managed_devices_list,
2797 "service_template": self.get_service_templates_list,
2798 "deployment": self.get_deployments_list,
2799 "firmware_repository": self.get_firmware_repository_list
2800 }
2801 if subset:
2802 subset_result_filter = {key: subset_dict_with_filter[key](
2803 filter_dict=filter_dict) for key in subset if key in subset_dict_with_filter}
2804 subset_result_wo_param = {key: subset_wo_param[key](
2805 ) for key in subset if key in subset_wo_param}
2806
2807 self.module.exit_json(
2808 Array_Details=array_details,
2809 API_Version=api_version,
2810 SDCs=subset_result_filter.get("sdc", []),
2811 SDSs=subset_result_filter.get("sds", []),
2812 Storage_Pools=subset_result_filter.get("storage_pool", []),
2813 Volumes=subset_result_filter.get("vol", []),
2814 Snapshot_Policies=subset_result_filter.get("snapshot_policy", []),
2815 Protection_Domains=subset_result_filter.get(
2816 "protection_domain", []),
2817 Devices=subset_result_filter.get("device", []),
2818 Replication_Consistency_Groups=subset_result_filter.get("rcg", []),
2819 Replication_Pairs=subset_result_filter.get("replication_pair", []),
2820 Fault_Sets=subset_result_filter.get("fault_set", []),
2821 SDTs=subset_result_filter.get("sdt", []),
2822 ManagedDevices=subset_result_wo_param.get("managed_device", []),
2823 ServiceTemplates=subset_result_wo_param.get(
2824 "service_template", []),
2825 Deployments=subset_result_wo_param.get("deployment", []),
2826 FirmwareRepository=subset_result_wo_param.get(
2827 "firmware_repository", []),
2828 NVMeHosts=subset_result_filter.get("nvme_host", [])
2829 )
2830
2831
2832 def result_list(entity):
2833 """ Get the name and id associated with the PowerFlex entities """
2834 result = []
2835 if entity:
2836 LOG.info('Successfully listed.')
2837 for item in entity:
2838 if item['name']:
2839 result.append(item)
2840 else:
2841 result.append({"id": item['id']})
2842 return result
2843 else:
2844 return None
2845
2846
2847 def get_powerflex_info_parameters():
2848 """This method provides parameters required for the ansible
2849 info module on powerflex"""
2850 return dict(
2851 gather_subset=dict(type='list', required=False, elements='str',
2852 choices=['vol', 'storage_pool',
2853 'protection_domain', 'sdc', 'sds', 'snapshot_policy',
2854 'device', 'rcg', 'replication_pair', 'fault_set',
2855 'service_template', 'managed_device', 'deployment', 'firmware_repository', 'nvme_host', 'sdt']),
2856 filters=dict(type='list', required=False, elements='dict',
2857 options=dict(filter_key=dict(type='str', required=True, no_log=False),
2858 filter_operator=dict(
2859 type='str', required=True,
2860 choices=['equal', 'contains']),
2861 filter_value=dict(type='str', required=True)
2862 )),
2863 sort=dict(type='str'),
2864 limit=dict(type='int', default=50),
2865 offset=dict(type='int', default=0),
2866 include_devices=dict(type='bool', default=True),
2867 include_template=dict(type='bool', default=True),
2868 full=dict(type='bool', default=False),
2869 include_attachments=dict(type='bool', default=True),
2870 include_related=dict(type='bool', default=False),
2871 include_bundles=dict(type='bool', default=False),
2872 include_components=dict(type='bool', default=False),
2873 )
2874
2875
2876 def main():
2877 """ Create PowerFlex info object and perform action on it
2878 based on user input from playbook"""
2879 obj = PowerFlexInfo()
2880 obj.perform_module_operation()
2881
2882
2883 if __name__ == '__main__':
2884 main()