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

Adding support with multiple volume with the same name on different Vserver #51

Closed MicKBfr closed 3 months ago

MicKBfr commented 3 months ago

Bug description

when we have for exemple test volume on different vserver Exemple : SVM1 : test SVM: test

we have some issue with Get-Ncvol -volume test without vserver context

COMMENTAIRES : [ 12:24:33:080 ] [ Document ] - Collecting ONTAP Vserver volumes snapshot information. AVERTISSEMENT : [ 12:24:33:961 ] [ Document ] - Impossible de traiter la transformation d'argument sur le paramètre « TEXT ». Impossible de convertir la valeur en type System.String.

Get-NcEfficiency : La référence d'objet n'est pas définie à une instance d'un objet. Au caractère C:\Users\toto\Documents\WindowsPowerShell\Modules\AsBuiltReport.NetApp.ONTAP\0.6.7\Src\Public\Invoke-AsBuiltReport.NetApp.ONTAP.ps1:645 : 37

Command-line input

New-AsBuiltReport -Report 'NetApp.ONTAP' -Target $NetApp -credential $Credential -Format 'Word','HTML' -AsBuiltConfigFilePath $varCheminRepertoireScript'\Config\config.json' -ReportConfigFilePath $varCheminRepertoireScript'\Config\AsBuiltReport.NetApp.ONTAP.json' -OutputFolderPath $varCheminRepertoireScript'\Output' -Filename $NetApp -EnableHealthCheck -Timestamp -verbose -Debug

Steps to reproduce

  1. create some volume with same name on different SVM
  2. generate report

Expected behaviour

No Warning

Screenshots

No response

Operating System

Windows

PowerShell Version

Name Value


PSVersion 5.1.17763.5830
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.5830
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

PowerShell Modules

Name Version


AsBuiltReport.NetApp.ONTAP 0.6.7
PScribo 0.10.0

Additional Context

Fix will be available in few days

Before submitting

MicKBfr commented 3 months ago

Try to fix it. Let me know if it's OK

Thanks

rebelinux commented 3 months ago

Good catch. The code looks good to me. Thank you!