Skip to content

Add support for Azure NetApp Files reporting#31

Merged
tpcarman merged 3 commits into
AsBuiltReport:devfrom
cse-gh:add-netappfiles
May 4, 2026
Merged

Add support for Azure NetApp Files reporting#31
tpcarman merged 3 commits into
AsBuiltReport:devfrom
cse-gh:add-netappfiles

Conversation

@cse-gh
Copy link
Copy Markdown
Contributor

@cse-gh cse-gh commented Apr 23, 2026

Description

Add a new Get-AbrAzNetAppFiles private function that documents Azure NetApp Files (ANF) across the account → capacity pool → volume hierarchy, plus snapshot and backup policies. Modelled on the Get-AbrAzDesktopVirtualization pattern: one consolidated function in Src/Private/ covering every ANF resource type with InfoLevel-gated rendering and health-check styling.

Related Issue

Closes #30

Motivation and Context

Azure NetApp Files is a tier-1 file storage service used by enterprises for high-performance SMB/NFS workloads. It is currently the only major Azure storage service not covered by this report, which limits the usefulness of the generated as-built document for customers running ANF.

How Has This Been Tested?

Environment: macOS 25.5, PowerShell 7.6.0, Az.NetAppFiles 1.1.0, AsBuiltReport.Microsoft.Azure local checkout of dev with this branch applied.

Automated validation:

  • PSScriptAnalyzer -Recurse on Src/: 0 findings in Get-AbrAzNetAppFiles.ps1 (one PSUseSingularNouns warning is suppressed in-source with a justification, since both the Azure service and the Az.NetAppFiles module use the plural form).
  • Invoke-Pester Tests/: 203 passed, 0 failed, including LocalizationData.Tests.ps1 verifying key consistency across all five cultures.

Live tenant run: HTML report generated end-to-end against a tenant with one NetApp Account, one Capacity Pool (134 TiB, 95.5% allocated), and 14 CIFS volumes with an AD-joined SMB server. Confirmed:

  • Summary tables render at InfoLevel 1.
  • Per-account detail with Active Directory configuration renders at InfoLevel 2.
  • Per-pool and per-volume NOTOC sections render at InfoLevel 2/3 with mount targets and export-policy subsections.
  • Per-policy snapshot and backup sections render correctly at InfoLevel 3.
  • Health checks fire as expected (pool-near-capacity warning on 95.5% allocation; No Policy Attached Info styling on volumes without backup policies; Platform-Managed Info styling on accounts without customer-managed keys).

Out of scope for this PR (deferred for a potential follow-up): Volume Groups (SAP HANA), Subvolumes, Backup Vaults, cross-region replication relationships. None are rendered by this change; they can be added incrementally without breaking the existing schema.

Screenshots (if appropriate):

(Happy to provide sanitised HTML excerpts on request — the ones I have contain tenant-specific resource names.)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the contributing documentation.

Files changed

  • AsBuiltReport.Microsoft.Azure/Src/Private/Get-AbrAzNetAppFiles.ps1 (new, consolidated ANF function)
  • AsBuiltReport.Microsoft.Azure/Src/Public/Invoke-AsBuiltReport.Microsoft.Azure.ps1 (register NetAppFiles in $DefaultSectionOrder and $SectionFunctionMap)
  • AsBuiltReport.Microsoft.Azure/Language/{en-US,en-GB,es-ES,fr-FR,de-DE}/MicrosoftAzure.psd1 (append GetAbrAzNetAppFiles string block; non-en-US cultures mirror the English strings pending native translations)
  • AsBuiltReport.Microsoft.Azure/AsBuiltReport.Microsoft.Azure.json (add NetAppFiles to SectionOrder, InfoLevel default 1, HealthCheck with five flags all true)
  • CHANGELOG.md (entry under [Unreleased])
  • README.md (add NetApp Files to supported-resources list, NetAppFiles row in the InfoLevel table with default 1 / max 4, and a new NetAppFiles subsection under Healthcheck)

Add a new Get-AbrAzNetAppFiles private function that documents Azure
NetApp Files (ANF) across the account, capacity pool, and volume
hierarchy, plus snapshot and backup policies. Modelled on the AVD
implementation: one consolidated function in Src/Private/ covering
every ANF resource type with InfoLevel-gated rendering and
health-check styling.

Resources covered:
- NetApp Accounts (with Active Directory join and encryption config)
- Capacity Pools (service level, QoS, size, allocation %, throughput)
- Volumes (protocol, quota, mount targets, export policy rules,
  snapshot/backup policy references, cool access tiering, SMB/NFS
  attributes, provisioning state)
- Snapshot Policies (hourly/daily/weekly/monthly schedules)
- Backup Policies (daily/weekly/monthly retention)
- Per-volume snapshots and quota rules at InfoLevel 4

Health checks (all gated by Healthcheck.NetAppFiles.<flag>):
- PoolCapacity: warning when sum of volume quotas > 85% of pool size
- AdHealth: warning when Active Directory join status != InUse
- SnapshotPolicy: info when a volume has no snapshot policy attached
- BackupProtection: info when a volume has no backup policy attached
- CustomerManagedKey: info when account uses platform-managed keys

Internationalization: GetAbrAzNetAppFiles string block added to all
five supported cultures (en-US, en-GB, es-ES, fr-FR, de-DE). Non-en-US
cultures currently mirror the English strings pending native
translations.

Orchestrator: register NetAppFiles in $DefaultSectionOrder and
$SectionFunctionMap. Default config adds NetAppFiles entries to
SectionOrder, InfoLevel (1), and HealthCheck with the five flags
enabled.

Documentation: README gains "NetApp Files" in the supported-resources
list, an entry in the InfoLevel table (default 1, max 4), and a
dedicated Healthcheck subsection. CHANGELOG records the addition
under [Unreleased].

Cmdlets consumed from Az.NetAppFiles: Get-AzNetAppFilesAccount,
Get-AzNetAppFilesPool, Get-AzNetAppFilesVolume,
Get-AzNetAppFilesSnapshot, Get-AzNetAppFilesSnapshotPolicy,
Get-AzNetAppFilesBackupPolicy, Get-AzNetAppFilesVolumeQuotaRule.

Validated with PSScriptAnalyzer (0 findings in new file) and the
existing Pester test suite (203/203 passing, including the
LocalizationData consistency checks across all five cultures).
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 412 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...crosoft.Azure/Src/Private/Get-AbrAzNetAppFiles.ps1 0.00% 411 Missing ⚠️
...rc/Public/Invoke-AsBuiltReport.Microsoft.Azure.ps1 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

@tpcarman tpcarman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @cse-gh,

Thanks for this PR. Please review my comments and let me know if you have any questions.

Thanks.

Comment thread AsBuiltReport.Microsoft.Azure/Language/de-DE/MicrosoftAzure.psd1
Comment thread AsBuiltReport.Microsoft.Azure/Language/es-ES/MicrosoftAzure.psd1
Comment thread AsBuiltReport.Microsoft.Azure/Language/fr-FR/MicrosoftAzure.psd1
Comment thread AsBuiltReport.Microsoft.Azure/Language/en-GB/MicrosoftAzure.psd1
Comment thread AsBuiltReport.Microsoft.Azure/Src/Private/Get-AbrAzNetAppFiles.ps1
cse-gh added 2 commits May 4, 2026 10:05
Address PR AsBuiltReport#31 review feedback (tpcarman): use descriptive names instead
of single-letter / abbreviated loop variables.

  $Acct -> $NetAppAccount
  $P    -> $CapacityPool
  $V    -> $Volume
  $Mt   -> $MountTarget
  $S    -> $Snapshot
  $Qr   -> $QuotaRule
  $Pol  -> $Policy
  $Pols -> $Policies

Pure rename: 147 insertions / 147 deletions, no logic change.
PSScriptAnalyzer: 0 findings.
…en-GB spellings

Address PR AsBuiltReport#31 review feedback (tpcarman): the appended NetApp Files
localization block was previously placeholder English in non-en-US
cultures. Now properly translated.

- de-DE: 116 strings translated to German with umlauts/sharp-s
  (UTF-8 without BOM, matching the existing file's convention).
- es-ES: 116 strings translated to Spanish with full diacritics
  (UTF-8 without BOM, matching the existing file).
- fr-FR: 116 strings translated to French in pure ASCII, matching
  the existing file's accent-stripped convention (e.g. "resume",
  "cle", "strategie").
- en-GB: 7 spellings adjusted (summarizes -> summarises x5,
  Utilized -> Utilised, Organizational -> Organisational) to match
  the rest of the file's en-GB style.

Per project convention preserved across all non-en-US files,
"Yes"/"No" are kept untranslated. Azure-specific technical terms
(SMB, NFSv3, AES, LDAP, FQDN, Active Directory, Cool Access,
Kerberos, RBAC, etc.) are also kept in English.

Validation:
- All 5 Tests/LocalizationData.Tests.ps1 Pester tests pass
  (key consistency across en-US/en-GB/de-DE/es-ES/fr-FR).
- Import-LocalizedData round-trips cleanly for each culture
  with all 116 keys present.
@cse-gh
Copy link
Copy Markdown
Contributor Author

cse-gh commented May 4, 2026

Requested changes and updates completed.

@cse-gh
Copy link
Copy Markdown
Contributor Author

cse-gh commented May 4, 2026

Tested German language, info level 4 with health checks. Report generated as expected.

cse-gh added a commit to cse-gh/Get-AbrAzNetAppFiles that referenced this pull request May 4, 2026
… / fr-FR; en-GB spellings

Mirrors upstream PR AsBuiltReport/AsBuiltReport.Microsoft.Azure#31
review feedback by tpcarman.

Variable renames in Get-AbrAzNetAppFiles.ps1 (147 ins / 147 del, pure rename):
  $Acct -> $NetAppAccount
  $P    -> $CapacityPool
  $V    -> $Volume
  $Mt   -> $MountTarget
  $S    -> $Snapshot
  $Qr   -> $QuotaRule
  $Pol  -> $Policy
  $Pols -> $Policies

Localization (303 ins / 303 del across 4 files):
  - de-DE: 116 strings translated to German with umlauts/sharp-s.
  - es-ES: 116 strings translated to Spanish with full diacritics.
  - fr-FR: 116 strings translated to French in pure ASCII (matching the
    file's existing accent-stripped convention).
  - en-GB: 7 spellings adjusted (summarises x5, Utilised, Organisational).

Per project convention "Yes"/"No" remain untranslated in non-en-US files.
Azure-specific technical terms (SMB, NFSv3, AES, LDAP, FQDN, etc.) also
remain in English.

Validation:
  - PSScriptAnalyzer clean on the .ps1 (0 findings).
  - All five MicrosoftAzure.psd1 files load via Import-LocalizedData
    with 116 keys each.
  - End-to-end test: report generated against live tenant in de-DE at
    InfoLevel 4 with health checks; all three ANF health checks fired
    correctly (PoolCapacity, BackupProtection, CustomerManagedKey).
@tpcarman tpcarman merged commit aa30734 into AsBuiltReport:dev May 4, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for Azure NetApp Files reporting

3 participants