AsBuiltReport / AsBuiltReport.NetApp.ONTAP

A PowerShell module to generate an as built report on the configuration of NetApp ONTAP storage arrays.
MIT License
15 stars 3 forks source link

Add Consistency Group Support #28

Closed rebelinux closed 2 years ago

rebelinux commented 2 years ago

Volume CG:

PS /home/rebelinux> (Get-NcVol).ConsistencyGroup                                                                      

Name
----
Oracle_DB_Storage

PS /home/rebelinux> 

Lun CG:

PS /home/rebelinux> (Get-NcLun).ConsistencyGroup

Links                       Name              Uuid
-----                       ----              ----
DataONTAP.C.Types.Lun.Links Oracle_DB_Storage c438fe24-5d1b-11ed-bc5b-005056b053e3
DataONTAP.C.Types.Lun.Links Oracle_DB_Storage c438fe24-5d1b-11ed-bc5b-005056b053e3
DataONTAP.C.Types.Lun.Links Oracle_DB_Storage c438fe24-5d1b-11ed-bc5b-005056b053e3

PS /home/rebelinux> 

CG Snapshot:

PS /home/rebelinux> $CG = (Get-NcVol).ConsistencyGroup.Name                                               
PS /home/rebelinux> Get-NcConsistencyGroupSnapshots -ConsistencyGroup $CG                                 

ConsistencyGroupName      SnapshotCopyName     ConsistencyType      Vserver
--------------------      ----------------     ---------------      -------
Oracle_DB_Storage         Prueba               crash                SAN

PS /home/rebelinux> 
rebelinux commented 2 years ago

Fuck Powershell:

PS /home/rebelinux/Projects> Get-NetAppOntapAPI -uri '/api/application/consistency-groups?svm=SAN&fields=**&return_records=true&return_timeout=15'

uuid        : c438fe24-5d1b-11ed-bc5b-005056b053e3
name        : Oracle_DB_Storage
svm         : @{uuid=683e4d05-5d19-11ed-b795-005056b053e3; name=SAN}
qos         : @{policy=}
tiering     : @{policy=none}
create_time : 11/5/2022 11:08:57AM
volumes     : {@{uuid=c4509e59-5d1b-11ed-bc5b-005056b053e3; qos=; tiering=; comment=; create_time=11/5/2022 11:08:56AM; name=Oracle_DB_Storage_vol_1; snapshot_policy=; space=; 
              activity_tracking=}}
luns        : {@{uuid=c450b10b-5d1b-11ed-bc5b-005056b053e3; location=; lun_maps=System.Object[]; name=/vol/Oracle_DB_Storage_vol_1/Oracle_DB_Storage_lun_1_1; auto_delete=False; 
              class=regular; create_time=11/5/2022 11:08:57AM; os_type=linux; serial_number=wpIXY$TmuZRR; space=; status=}, @{uuid=c450b1f1-5d1b-11ed-bc5b-005056b053e3; location=; 
              lun_maps=System.Object[]; name=/vol/Oracle_DB_Storage_vol_1/Oracle_DB_Storage_lun_1_2; auto_delete=False; class=regular; create_time=11/5/2022 11:08:57AM; os_type=linux; 
              serial_number=wpIXY$TmuZRS; space=; status=}, @{uuid=c450e7ac-5d1b-11ed-bc5b-005056b053e3; location=; name=/vol/Oracle_DB_Storage_vol_1/Oracle_DB_Storage_lun_1_3; 
              auto_delete=False; class=regular; create_time=11/5/2022 11:08:57AM; os_type=linux; serial_number=wpIXY$TmuZRT; space=; status=}}
space       : @{size=33178624000; available=33176469504; used=2154496}
replicated  : False

PS /home/rebelinux/Projects> 
rebelinux commented 2 years ago

CG Snapshot API:

PS /home/rebelinux/Projects> Get-NetAppOntapAPI -uri "/api/application/consistency-groups/$($CG.uuid)/snapshots"

uuid                                 name
----                                 ----
78210afb-5d24-11ed-bc5b-005056b053e3 Prueba

PS /home/rebelinux/Projects> 
rebelinux commented 2 years ago

Fixed:

image