Skip to content

feat: add FlexGroup create support to create_volume - #223

Merged
Hardikl merged 3 commits into
NetApp:mainfrom
dbtinsley:feat/flexgroup-create-volume
Sep 28, 2026
Merged

Hardikl merged 3 commits into
NetApp:mainfrom
dbtinsley:feat/flexgroup-create-volume

Conversation

@dbtinsley

Copy link
Copy Markdown
Contributor

Summary

  • Closes feat: add FlexGroup create support to create_volume #215. Extends create_volume with FlexGroup fields (style, aggregate_names, constituents_per_aggregate, optimize_aggr_list, granular_data) so agents can create a Unified NAS FlexGroup without dropping to REST.
  • Builds on feat: handled volume create in AFX cluster #198: AFX FlexVol create still omits aggregates; FlexGroup placement on AFX is refused (AFX auto-placement remains out of scope).
  • Fails closed on personalities where a Unified FlexGroup body is wrong: classic ASA rejects FlexGroup; ASA r2 still rejects create_volume (use storage units). FlexVol on CDOT/classic ASA is unchanged when the new fields are unset.

Test plan

  • Unit tests in server/volume_test.go: CDOT FlexVol JSON body unchanged; FlexGroup with two aggregates and constituents_per_aggregate; reject both aggregate fields; reject FlexGroup without aggregate_names; reject flexgroup_constituent; reject FlexGroup-only fields on FlexVol; optimize_aggr_list omit/false/true; granular_data disabled/basic/advanced/invalid; classic ASA FlexGroup refuse and FlexVol allow; AFX FlexGroup refuse; AFX FlexVol without aggregate.
  • Existing feat: handled volume create in AFX cluster #198 TestNewCreateVolume cases still pass (CDOT/AFX/ASA r2).
  • GOTOOLCHAIN=go1.27.1 go test ./...

dbtinsley and others added 2 commits September 16, 2026 00:20
Expose style, multi-aggregate placement, and related FlexGroup fields on
create_volume for Unified NAS, while keeping AFX FlexVol create from NetApp#198
and failing closed on classic ASA and ASA r2.
Avoid contextcheck by not calling getHTTPClient from Remote, and use
builtin new() in volume tests instead of pointer helpers.

Co-authored-by: Cursor <cursoragent@cursor.com>
@dbtinsley
dbtinsley force-pushed the feat/flexgroup-create-volume branch from bc3cefe to 0aaf774 Compare September 16, 2026 04:36
Comment thread server/volume.go Outdated
Comment thread server/volume.go
Classic ASA is Model=CDOT with san_optimized set, so CreateVolume needs
that flag from the existing GetClusterInfo cache rather than a second
client.Remote call. Also reject empty aggregate_names entries.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread server/volume.go
Comment thread server/volume.go
Comment thread server/volume.go
Comment thread server/volume_test.go

@cgrinds cgrinds left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@rahulguptajss comments will be addressed in the same PR that adds this feature to ONTAP-MCP's CI

@Hardikl
Hardikl merged commit 42729ae into NetApp:main Sep 28, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add FlexGroup create support to create_volume

4 participants