Skip to content

Commit

Permalink
Merge pull request #3 from terrycain/list-datasets
Browse files Browse the repository at this point in the history
Added ListDatasets
  • Loading branch information
dariusbakunas authored Jul 18, 2022
2 parents 16b70bf + e10a332 commit 3f3c198
Show file tree
Hide file tree
Showing 8 changed files with 446 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ _testmain.go
*.exe
*.test
*.prof
.idea/
.idea/

openapitools.json
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ Class | Method | HTTP request | Description
*DatasetApi* | [**CreateDataset**](docs/DatasetApi.md#createdataset) | **Post** /pool/dataset |
*DatasetApi* | [**DeleteDataset**](docs/DatasetApi.md#deletedataset) | **Delete** /pool/dataset/id/{id} |
*DatasetApi* | [**GetDataset**](docs/DatasetApi.md#getdataset) | **Get** /pool/dataset/id/{id} |
*DatasetApi* | [**ListDatasets**](docs/DatasetApi.md#listdatasets) | **Get** /pool/dataset |
*DatasetApi* | [**UpdateDataset**](docs/DatasetApi.md#updatedataset) | **Put** /pool/dataset/id/{id} |
*GroupApi* | [**CreateGroup**](docs/GroupApi.md#creategroup) | **Post** /group |
*GroupApi* | [**DeleteGroup**](docs/GroupApi.md#deletegroup) | **Delete** /group/id/{id} |
Expand Down
60 changes: 60 additions & 0 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,50 @@ paths:
tags:
- pool
/pool/dataset:
get:
operationId: listDatasets
parameters:
- explode: true
in: query
name: limit
required: false
schema:
type: integer
style: form
- explode: true
in: query
name: offset
required: false
schema:
type: integer
style: form
- explode: true
in: query
name: count
required: false
schema:
type: boolean
style: form
- explode: true
in: query
name: sort
required: false
schema:
type: string
style: form
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/ListDatasetResponse'
description: A list of datasets
"401":
description: No authorization for this endpoint
security:
- bearerAuth: []
tags:
- dataset
post:
description: "Creates a dataset/zvol.\n\n`volsize` is required for type=VOLUME\
\ and is supposed to be a multiple of the block size.\n`sparse` and `volblocksize`\
Expand Down Expand Up @@ -1323,6 +1367,10 @@ components:
- command
- user
type: object
ListDatasetResponse:
items:
$ref: '#/components/schemas/Dataset'
type: array
CreateDatasetParams:
example:
quota_critical: 1
Expand Down Expand Up @@ -1914,6 +1962,10 @@ components:
rawvalue: rawvalue
source: source
value: value
available:
rawvalue: rawvalue
source: source
value: value
recordsize:
rawvalue: rawvalue
source: source
Expand All @@ -1926,6 +1978,10 @@ components:
rawvalue: rawvalue
source: source
value: value
used:
rawvalue: rawvalue
source: source
value: value
type: type
volblocksize:
rawvalue: rawvalue
Expand Down Expand Up @@ -2057,6 +2113,8 @@ components:
$ref: '#/components/schemas/CompositeValue'
atime:
$ref: '#/components/schemas/CompositeValue'
available:
$ref: '#/components/schemas/CompositeValue'
casesensitivity:
$ref: '#/components/schemas/CompositeValue'
comments:
Expand Down Expand Up @@ -2097,6 +2155,8 @@ components:
$ref: '#/components/schemas/CompositeValue'
snapdir:
$ref: '#/components/schemas/CompositeValue'
used:
$ref: '#/components/schemas/CompositeValue'
pbkdf2iters:
$ref: '#/components/schemas/CompositeValue'
origin:
Expand Down
133 changes: 133 additions & 0 deletions api_dataset.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 52 additions & 0 deletions cfg/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,50 @@ paths:
schema:
type: string
/pool/dataset:
get:
operationId: listDatasets
parameters:
- explode: true
in: query
name: limit
required: false
schema:
type: integer
style: form
- explode: true
in: query
name: offset
required: false
schema:
type: integer
style: form
- explode: true
in: query
name: count
required: false
schema:
type: boolean
style: form
- explode: true
in: query
name: sort
required: false
schema:
type: string
style: form
responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/ListDatasetResponse'
description: A list of datasets
"401":
description: No authorization for this endpoint
security:
- bearerAuth: [ ]
tags:
- dataset
post:
tags:
- dataset
Expand Down Expand Up @@ -1208,6 +1252,10 @@ components:
type: boolean
schedule:
$ref: '#/components/schemas/CronJobSchedule'
ListDatasetResponse:
type: array
items:
$ref: '#/components/schemas/Dataset'
CreateDatasetParams:
type: object
required:
Expand Down Expand Up @@ -1733,6 +1781,8 @@ components:
$ref: '#/components/schemas/CompositeValue'
atime:
$ref: '#/components/schemas/CompositeValue'
available:
$ref: '#/components/schemas/CompositeValue'
casesensitivity:
$ref: '#/components/schemas/CompositeValue'
comments:
Expand Down Expand Up @@ -1773,6 +1823,8 @@ components:
$ref: '#/components/schemas/CompositeValue'
snapdir:
$ref: '#/components/schemas/CompositeValue'
used:
$ref: '#/components/schemas/CompositeValue'
pbkdf2iters:
$ref: '#/components/schemas/CompositeValue'
origin:
Expand Down
Loading

0 comments on commit 3f3c198

Please sign in to comment.