move disks to own graphql dir/file

Signed-off-by: Alexis Tyler <xo@wvvw.me>
This commit is contained in:
Alexis Tyler
2019-07-12 15:09:08 +09:30
parent df7297e86e
commit a4d1582c8e
2 changed files with 59 additions and 50 deletions

View File

@@ -31,54 +31,4 @@ type Capacity {
free: Long
used: Long
total: Long
}
type Disk {
idx: String!
name: String!
device: String!
id: String!
size: Int!
status: DiskStatus!
rotational: Boolean!
format: String!
temp: Int!
numReads: Int!
numWrites: Int!
numErrors: Int!
type: DiskType!
color: String!
fsStatus: DiskFsStatus!
luksState: String!
comment: String!
exportable: Boolean!
fsType: DiskFsType!
fsColor: DiskFsColor!
fsSize: Int!
fsFree: Int!
spindownDelay: String!
spinupGroup: String!
deviceSb: String!
idSb: String!
sizeSb: Int!
}
enum DiskStatus {
DISK_OK
}
enum DiskType {
Data
}
enum DiskFsStatus {
Mounted
}
enum DiskFsType {
xfs
}
enum DiskFsColor {
green_on
}

View File

@@ -0,0 +1,59 @@
type Query {
disk(id: String!): Disk @func(module: "disks/disk/get-disk")
disks: [Disk]! @func(module: "get-disks")
}
type Mutation {
mountDisk: Disk
unmountDisk: Disk
}
type Disk {
idx: String!
name: String!
device: String!
id: String!
size: Int!
status: DiskStatus!
rotational: Boolean!
format: String!
temp: Int!
numReads: Int!
numWrites: Int!
numErrors: Int!
type: DiskType!
color: String!
fsStatus: DiskFsStatus!
luksState: String!
comment: String!
exportable: Boolean!
fsType: DiskFsType!
fsColor: DiskFsColor!
fsSize: Int!
fsFree: Int!
spindownDelay: String!
spinupGroup: String!
deviceSb: String!
idSb: String!
sizeSb: Int!
}
enum DiskStatus {
DISK_OK
}
enum DiskType {
Data
}
enum DiskFsStatus {
Mounted
}
enum DiskFsType {
xfs
}
enum DiskFsColor {
green_on
}