The Rename() method is not implemented for the ontap-nas-economy (qtree) and ontap-san-economy storage drivers. Both currently return a hard error (I am planning to raise a PR for this fix):
storage_drivers/ontap/ontap_nas_qtree.go:812 → errors.New("rename is not implemented")
storage_drivers/ontap/ontap_san_economy.go:1185 → errors.New("rename is not implemented")
This creates a feature parity gap with the non-economy variants (ontap-nas and ontap-san), which implement Rename correctly.
Impact
Volume rename is used internally during volume import operations and certain recovery workflows. Users of economy drivers are blocked from these flows entirely, receiving an opaque "rename is not implemented" error.
Root Cause
The ONTAP API abstraction layer already provides all the necessary primitives:
OntapAPIREST.QtreeRename(ctx, path, newPath) — implemented in api/abstraction_rest.go:1452
OntapAPIZAPI.QtreeRename(ctx, path, newPath) — implemented in api/abstraction_zapi.go:1999
OntapAPIREST.LunRename(ctx, lunPath, newLunPath) — implemented in api/abstraction_rest.go:2689
OntapAPIZAPI.LunRename(ctx, lunPath, newLunPath) — implemented in api/abstraction_zapi.go:801
Both REST and ZAPI paths have API-layer tests in abstraction_rest_test.go and abstraction_zapi_test.go. The driver-level Rename() methods simply never call them.
Proposed Fix
For NASQtreeStorageDriver.Rename():
The same lookup pattern used by Destroy() applies, use d.API.QtreeExists() to locate the parent FlexVol, construct the full qtree paths (/vol/<flexvol>/<name>), then call d.API.QtreeRename().
For SANEconomyStorageDriver.Rename(): Same pattern as Destroy(), use d.LUNExists() to find the bucket FlexVol, build paths via GetLUNPathEconomy(bucketVol, name), then call d.API.LunRename().
Reference implementation for both can be modeled after:
NASStorageDriver.Rename() in ontap_nas.go:888 (single-line VolumeRename call)
SANStorageDriver.Rename() in ontap_san.go:902 (with error wrapping)
Scope
- Implement
Rename() in ontap_nas_qtree.go
- Implement
Rename() in ontap_san_economy.go
- Add unit tests for both (following patterns in existing
*_test.go files for these drivers)
Please let me know if there are any constraints around qtree/LUN rename I should be aware of before proceeding.
The
Rename()method is not implemented for the ontap-nas-economy (qtree) and ontap-san-economy storage drivers. Both currently return a hard error (I am planning to raise a PR for this fix):storage_drivers/ontap/ontap_nas_qtree.go:812→errors.New("rename is not implemented")storage_drivers/ontap/ontap_san_economy.go:1185→errors.New("rename is not implemented")This creates a feature parity gap with the non-economy variants (
ontap-nasandontap-san), which implement Rename correctly.Impact
Volume rename is used internally during volume import operations and certain recovery workflows. Users of economy drivers are blocked from these flows entirely, receiving an opaque "rename is not implemented" error.
Root Cause
The ONTAP API abstraction layer already provides all the necessary primitives:
OntapAPIREST.QtreeRename(ctx, path, newPath)— implemented inapi/abstraction_rest.go:1452OntapAPIZAPI.QtreeRename(ctx, path, newPath)— implemented inapi/abstraction_zapi.go:1999OntapAPIREST.LunRename(ctx, lunPath, newLunPath)— implemented inapi/abstraction_rest.go:2689OntapAPIZAPI.LunRename(ctx, lunPath, newLunPath)— implemented inapi/abstraction_zapi.go:801Both REST and ZAPI paths have API-layer tests in
abstraction_rest_test.goandabstraction_zapi_test.go. The driver-levelRename()methods simply never call them.Proposed Fix
For
NASQtreeStorageDriver.Rename():The same lookup pattern used by
Destroy()applies, used.API.QtreeExists()to locate the parent FlexVol, construct the full qtree paths (/vol/<flexvol>/<name>), then calld.API.QtreeRename().For
SANEconomyStorageDriver.Rename(): Same pattern asDestroy(), used.LUNExists()to find the bucket FlexVol, build paths viaGetLUNPathEconomy(bucketVol, name), then calld.API.LunRename().Reference implementation for both can be modeled after:
NASStorageDriver.Rename()inontap_nas.go:888(single-line VolumeRename call)SANStorageDriver.Rename()inontap_san.go:902(with error wrapping)Scope
Rename()inontap_nas_qtree.goRename()inontap_san_economy.go*_test.gofiles for these drivers)Please let me know if there are any constraints around qtree/LUN rename I should be aware of before proceeding.