Skip to content

Storage - STG105 NFS List V2 Files and Directories - #50036

Open
gunjansingh-msft wants to merge 1 commit into
feature/storage/stg105basefrom
stg105/nfsListV2
Open

Storage - STG105 NFS List V2 Files and Directories#50036
gunjansingh-msft wants to merge 1 commit into
feature/storage/stg105basefrom
stg105/nfsListV2

Conversation

@gunjansingh-msft

@gunjansingh-msft gunjansingh-msft commented Aug 5, 2026

Copy link
Copy Markdown
Member

Summary

Adds support for XNFS ListFilesV2 REST API enhancements to return extended metadata for NFS files directly from the list response.

This restores #49246, which was reverted from stg104 in #49770, now targeting stg105.

Swagger PR: Azure/azure-rest-api-specs#42720

Changes

  • Adds support for special file types (symlink, block device, character device, FIFO, socket) in list responses
  • ShareFileItem — new getLinkCount(), getFileType(), getLinkText(), getDeviceMajor(), getDeviceMinor()
  • ShareFileItemProperties — new getOwner(), getGroup(), getFileMode()
  • NfsFileType — new BLOCK_DEVICE, CHARACTER_DEVICE, SOCKET, FIFO
  • ShareListFilesAndDirectoriesOptions — new setIncludePermissions, setIncludeLinkCount, setIncludeNfsAttributes, setIncludeAll. setIncludeAll sends the single All value to the service rather than expanding it, since not all values apply to both SMB and NFS
  • FileType is always populated for files and directories on both SMB and NFS, based on the XML element type returned by the service

Impact

  • Eliminates need for per-file GET calls to retrieve metadata
  • Improves performance and scalability for scenarios like backup validation
  • Aligns NFS behavior with SMB ListFilesV2 capabilities

Testing

  • Mocked deserialization tests covering SymLink, BlockDevice, CharDevice, Fifo and Socket parsing
  • Recorded tests for NFS listing and ShareFileTraits.All on SMB are included but not yet recorded. assets.json stays at the stg105base tag until the feature is enabled in canary, so playback for these two tests will fail until they are re-recorded against seancettcanaryfilesprem

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
35 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Restores the NFS List V2 Files and Directories feature (#49246), which was
reverted from stg104 in #49770, rebased onto stg105base.

Handwritten files match #49246 exactly. Generated code was produced by
running autorest against the swagger link from Azure/azure-rest-api-specs#42720
already configured in the swagger README.

The only handwritten deviations from #49246 are those forced by this base:
- DirectoryListingDeserializationTests uses V2027_03_07; V2026_12_06 does
  not exist in ShareServiceVersion on stg105base.
- Dropped the ArrayList import in the two ShareDirectory clients; it is
  unused here and fails checkstyle.
- ModelHelper omits toShareFileRangeItems and its imports. That helper is
  STG103 paginated Get Range work, which is not on this base and is
  unrelated to this feature.

Recordings are not included. assets.json stays at the stg105base tag until
the feature is enabled in canary and the tests can be re-recorded.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Storage Storage Service (Queues, Blobs, Files)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant