Project

General

Profile

Feature #26806

Add API for managing datasets and zvols

Added by ChenTao Wang over 1 year ago. Updated 10 months ago.

Status:
Done
Priority:
Important
Assignee:
William Grzybowski
Category:
Middleware
Target version:
Estimated time:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:

Description

I added two properties in the "Advanced Mode" section of the GUI in: Volumes: Dataset/zvol: Edit Options: Advanced Mode.

So I need the changed API of "Get" and "Save" action of Dataset for new properties.

Options of "Snapshot directory" select box: { label: 'Visible', value: "0" }, { label: 'Invisible', value: "1" },

Options of "Copies" select box: { label: '1', value: "1" }, { label: '2', value: "2" }, { label: '3', value: "3" }

ID of "Snapshot directory" select box: 'snapdir'
ID of "Copies" select box: 'copies'

For example:

API response or parameter for request will be the following:

{ ....., "snapdir": 1, "copies": 2, .....}


Related issues

Related to FreeNAS - Feature #24734: Additional Dataset/ZVOL "Advanced Mode" Properties: readonly, snapdir and copiesResolved2017-06-20
Related to FreeNAS - Bug #27431: Issues for API for "Edit Dataset"Resolved2017-12-26

Associated revisions

Revision b039b41c (diff)
Added by William Grzybowski over 1 year ago

feat(middlewared/pool) add `pool.dataset` namespace with query and delete

Ticket: #26806

Revision db042c10 (diff)
Added by William Grzybowski over 1 year ago

feat(middlewared/pool): add `pool.dataset.create`

Ticket: #26806

Revision cf36d614 (diff)
Added by William Grzybowski over 1 year ago

feat(middlewared/pool): allow zvol to be created and add validation

Ticket: #26806

Revision b1b6eeef (diff)
Added by William Grzybowski over 1 year ago

feat(middlewared/pool): first pass at `pool.dataset.update`

Ticket: #26806

Revision 5f832277 (diff)
Added by William Grzybowski over 1 year ago

feat(middlewared/pool): use `str.lower` instead

Ticket: #26806

Revision cb0efc43 (diff)
Added by William Grzybowski over 1 year ago

feat(middlewared): add `edit` operation to Patch schema

Ticket: #26806

Revision 70ac7fff (diff)
Added by William Grzybowski over 1 year ago

feat(middlewared/pool): allow properties to inherit on update

Ticket: #26806

Revision 8aa4712a (diff)
Added by William Grzybowski over 1 year ago

fix(middlewared/pool): few fixes to pool.dataset.update

- some attribute cannot be updated
- avoid code duplication adding INHERIT to attributes
- missing `inheritable` in iterable

Ticket: #26806

Revision 7a6a68c0 (diff)
Added by William Grzybowski over 1 year ago

fix(middlewared/pool): couple more fixes to `pool.dataset`

- setting `volblocksize` on create
- `volblocksize` is not allowed in update
- add docstring to `pool.dataset.update`

Ticket: #26806

Revision 103ec06a (diff)
Added by William Grzybowski over 1 year ago

feat(middlewared/pool): add `snapdir` and `copies`

Ticket: #26806

Revision ea875753 (diff)
Added by William Grzybowski over 1 year ago

fix(middlewared): Bool attribute should not have a default

Sometimes we need to know if a Bool has been provided by the user and it
prevents that.

Ticket: #26806

History

#1 Updated by ChenTao Wang over 1 year ago

  • Related to Feature #24734: Additional Dataset/ZVOL "Advanced Mode" Properties: readonly, snapdir and copies added

#2 Updated by William Grzybowski over 1 year ago

  • Status changed from Unscreened to Screened

#3 Updated by William Grzybowski over 1 year ago

  • Status changed from Screened to Ready For Release

I have implemented websocket endpoints for that API, check `pool.dataset` namespace.

You can use pool.dataset.query to query for all attributes, pool.dataset.create to create dataset/zvol and pool.dataset.update to update properties.

#4 Updated by William Grzybowski over 1 year ago

#5 Updated by William Grzybowski over 1 year ago

  • Status changed from Ready For Release to Screened

Forgot to add `copies` and `snapdir` to update.

#6 Updated by William Grzybowski over 1 year ago

  • Status changed from Screened to Ready For Release

#7 Updated by ChenTao Wang over 1 year ago

  • Related to deleted (Feature #24734: Additional Dataset/ZVOL "Advanced Mode" Properties: readonly, snapdir and copies)

#8 Updated by ChenTao Wang over 1 year ago

  • Related to Feature #24734: Additional Dataset/ZVOL "Advanced Mode" Properties: readonly, snapdir and copies added

#9 Updated by ChenTao Wang over 1 year ago

  • Status changed from Ready For Release to Screened

#10 Updated by ChenTao Wang over 1 year ago

  • Status changed from Screened to Ready For Release

#11 Updated by ChenTao Wang over 1 year ago

  • Related to Bug #27431: Issues for API for "Edit Dataset" added

#12 Avatar?id=13649&size=24x24 Updated by Ben Gadd about 1 year ago

  • Status changed from Ready For Release to Done

#13 Updated by Dru Lavigne about 1 year ago

  • Subject changed from Change an API for "Edit Dataset" to Add API for managing datasets and zvols
  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

#14 Updated by Dru Lavigne 12 months ago

  • Status changed from Done to Ready for Testing

#15 Avatar?id=55038&size=24x24 Updated by Zackary Welch 10 months ago

  • Severity set to New

Currently working on testing these new API calls.

#16 Updated by William Grzybowski 10 months ago

Zackary Welch wrote:

Currently working on testing these new API calls.

This API is being used everywhere in new UI so I suppose we can skip QA on this ticket, given that those operations are working on new UI.

#17 Updated by William Grzybowski 10 months ago

  • Needs QA changed from Yes to No

#18 Updated by Dru Lavigne 10 months ago

  • Status changed from Ready for Testing to Done

Also available in: Atom PDF