Skip to content

Commit

Permalink
fix pool.dataset.details validation
Browse files Browse the repository at this point in the history
  • Loading branch information
yocalebo committed Jan 23, 2025
1 parent 1b4edb4 commit d72e130
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/middlewared/middlewared/api/v25_04_0/pool_dataset_details.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
from middlewared.api.base import BaseModel

from pydantic import ConfigDict, Field
# from pydantic import ConfigDict, Field

__all__ = ("PoolDatasetDetailsArgs", "PoolDatasetDetailsResults")

"""
FIXME: We need to fix the return validation
for this model but it is involved and tricky
and requires a ton of testing. (i.e. you need
to have a system with smb/nfs/iscsi/apps/vm/virt
shares created AND zpools with zfs dataset and zvols.)
class ZFSValues(BaseModel):
value: str | None
rawvalue: str
Expand Down Expand Up @@ -97,3 +104,12 @@ class PoolDatasetDetailsArgs(BaseModel):
class PoolDatasetDetailsResults(BaseModel):
result: list[PoolDatasetDetailsEntry]
"""


class PoolDatasetDetailsArgs(BaseModel):
pass


class PoolDatasetDetailsResults(BaseModel):
result: list[dict]

0 comments on commit d72e130

Please sign in to comment.