manifests/collectors/Storage/NetApp.psd1
|
# # GENERATED by scripts/ConvertTo-ScoutCollectorDefinition.ps1 from Modules/Public/InventoryModules/Storage/NetApp.ps1 (AB#5660). # Field expressions are copied verbatim from the original collector and evaluate in an # equivalent scope -- see docs/design/decisions/declarative-collectors.md. # Review before trusting; regenerate rather than hand-patch if the source collector changes. # @{ ResourceTypes = @( 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes' ) ResourceTypeMatching = 'Grouped' AdditionalFilter = $null FilterPreamble = '' RowLoopVariable = '1' Preamble = @' $ResUCount = 1 $sub1 = $SUB | Where-Object { $_.id -eq $1.subscriptionId } $data = $1.PROPERTIES $Retired = $Retirements | Where-Object { $_.id -eq $1.id } if ($Retired) { $RetiredFeature = foreach ($Retire in $Retired) { $RetiredServiceID = $Unsupported | Where-Object {$_.Id -eq $Retired.ServiceID} $tmp0 = [pscustomobject]@{ 'RetiredFeature' = $RetiredServiceID.RetiringFeature 'RetiredDate' = $RetiredServiceID.RetirementDate } $tmp0 } $RetiringFeature = if (@($RetiredFeature.RetiredFeature).count -gt 1) { $RetiredFeature.RetiredFeature | ForEach-Object { $_ + ' ,' } }else { $RetiredFeature.RetiredFeature} $RetiringFeature = [string]$RetiringFeature $RetiringFeature = if ($RetiringFeature -like '* ,*') { $RetiringFeature -replace ".$" }else { $RetiringFeature } $RetiringDate = if (@($RetiredFeature.RetiredDate).count -gt 1) { $RetiredFeature.RetiredDate | ForEach-Object { $_ + ' ,' } }else { $RetiredFeature.RetiredDate} $RetiringDate = [string]$RetiringDate $RetiringDate = if ($RetiringDate -like '* ,*') { $RetiringDate -replace ".$" }else { $RetiringDate } } else { $RetiringFeature = $null $RetiringDate = $null } $VNET = if(![string]::IsNullOrEmpty($data.subnetId)){$data.subnetId.split('/')[8]}else{$null} $Subnet = if(![string]::IsNullOrEmpty($data.subnetId)){$data.subnetId.split('/')[10]}else{$null} $ExportPolicy = @($data.exportPolicy.rules).count $NetApp = if(![string]::IsNullOrEmpty($1.Name)){$1.Name.split('/')[0]}else{$null} $CapacityPool = if(![string]::IsNullOrEmpty($1.Name)){$1.Name.split('/')[1]}else{$null} $Volume =if(![string]::IsNullOrEmpty($1.Name)){$1.Name.split('/')[2]}else{$null} $Quota = ((($data.usageThreshold/1024)/1024)/1024)/1024 $Tags = if(![string]::IsNullOrEmpty($1.tags.psobject.properties)){$1.tags.psobject.properties}else{'0'} '@ AdditionalRowLoops = @() TagLoop = @{ Variable = 'Tag' Source = '$Tags' Preamble = '' } Fields = @( @{ Name = 'ID' Expression = '$1.id' } @{ Name = 'Subscription' Expression = '$sub1.Name' } @{ Name = 'Resource Group' Expression = '$1.RESOURCEGROUP' } @{ Name = 'Location' Expression = '$1.LOCATION' } @{ Name = 'Retiring Feature' Expression = '$RetiringFeature' } @{ Name = 'Retiring Date' Expression = '$RetiringDate' } @{ Name = 'NetApp Account' Expression = '$NetApp' } @{ Name = 'Capacity Pool' Expression = '$CapacityPool' } @{ Name = 'Volume' Expression = '$Volume' } @{ Name = 'Service Level' Expression = '$data.serviceLevel' } @{ Name = 'Quota (TB)' Expression = '[string]$Quota' } @{ Name = 'Protocol' Expression = '[string]$data.protocolTypes' } @{ Name = 'Max Throughput MiB/s' Expression = '[string]$data.throughputMibps' } @{ Name = 'Export Policy Count' Expression = '[string]$ExportPolicy' } @{ Name = 'Network Features' Expression = '$data.networkFeatures' } @{ Name = 'Security Style' Expression = '$data.securityStyle' } @{ Name = 'SMB Encryption' Expression = '$data.smbEncryption' } @{ Name = 'UNIX Permissions' Expression = '$data.unixPermissions' } @{ Name = 'Cool Access' Expression = '$data.coolAccess' } @{ Name = 'VMWare Solution' Expression = '$data.avsDataStore' } @{ Name = 'LDAP' Expression = '$data.ldapEnabled' } @{ Name = 'VNET Name' Expression = '[string]$VNET' } @{ Name = 'Subnet Name' Expression = '[string]$Subnet' } @{ Name = 'Resource U' Expression = '$ResUCount' } @{ Name = 'Tag Name' Expression = '[string]$Tag.Name' } @{ Name = 'Tag Value' Expression = '[string]$Tag.Value' } ) Export = @{ WorksheetName = 'NetApp' TableNamePrefix = 'NetAppATable_' Columns = @( 'Subscription' 'Resource Group' 'Location' 'NetApp Account' 'Retiring Feature' 'Retiring Date' 'Capacity Pool' 'Volume' 'Service Level' 'Quota (TB)' 'Protocol' 'Max Throughput MiB/s' 'Export Policy Count' 'Network Features' 'Security Style' 'SMB Encryption' 'UNIX Permissions' 'Cool Access' 'VMWare Solution' 'LDAP' 'VNET Name' 'Subnet Name' 'Resource U' ) TagColumns = @( 'Tag Name' 'Tag Value' ) TagColumnsBefore = 'Resource U' NumberFormat = '0' ConditionalText = @( 'New-ConditionalText -Range E2:E100 -ConditionalType ContainsText' ) } SourceCollector = 'Modules/Public/InventoryModules/Storage/NetApp.ps1' } |