mirror of
https://github.com/unraid/api.git
synced 2026-01-14 12:39:53 -06:00
add addDiskToArray, removeDiskFromArray, mountDisk and unmountDisk and updated @unraid\core
Signed-off-by: Alexis Tyler <xo@wvvw.me>
This commit is contained in:
@@ -7,18 +7,30 @@ type Mutation {
|
||||
startArray: JSON @func(module: "array/update-array", data: { state: "start" })
|
||||
"""Stop array"""
|
||||
stopArray: JSON @func(module: "array/update-array", data: { state: "stop" })
|
||||
|
||||
"""Add new disk to array"""
|
||||
addDiskToArray(input: arrayDiskInput): Array @func(module: "array/add-disk")
|
||||
"""Remove existing disk from array. NOTE: The array must be stopped before running this otherwise it'll throw an error."""
|
||||
removeDiskFromArray(input: arrayDiskInput): Array @func(module: "array/add-disk")
|
||||
}
|
||||
|
||||
input arrayDiskInput {
|
||||
id: String!
|
||||
slot: Int | String
|
||||
}
|
||||
|
||||
type Array {
|
||||
state: ArrayState!
|
||||
"""Current array capacity"""
|
||||
capacity: ArrayCapacity!
|
||||
"""Disks in the current array"""
|
||||
disks: [Disk]
|
||||
}
|
||||
|
||||
enum ArrayState {
|
||||
"""Array is started"""
|
||||
"""Array is running"""
|
||||
started
|
||||
"""Array is stopped"""
|
||||
"""Array has stopped"""
|
||||
stopped
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
type Query {
|
||||
"""Single disk"""
|
||||
disk(id: String!): Disk @func(module: "disks/id/get-disk")
|
||||
"""Mulitiple disks"""
|
||||
disks: [Disk]! @func(module: "get-disks")
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
mountDisk: Disk
|
||||
unmountDisk: Disk
|
||||
mountDisk(id: String!): Disk
|
||||
unmountDisk(id: String!): Disk
|
||||
}
|
||||
|
||||
type Disk {
|
||||
@@ -23,19 +25,19 @@ type Disk {
|
||||
numErrors: Int!
|
||||
type: DiskType!
|
||||
color: String!
|
||||
fsStatus: DiskFsStatus!
|
||||
luksState: String!
|
||||
comment: String!
|
||||
fsStatus: String
|
||||
luksState: String
|
||||
comment: String
|
||||
exportable: Boolean!
|
||||
fsType: DiskFsType!
|
||||
fsColor: DiskFsColor!
|
||||
fsSize: Int!
|
||||
fsFree: Int!
|
||||
spindownDelay: String!
|
||||
spinupGroup: String!
|
||||
deviceSb: String!
|
||||
idSb: String!
|
||||
sizeSb: Int!
|
||||
spindownDelay: String
|
||||
spinupGroup: String
|
||||
deviceSb: String
|
||||
idSb: String
|
||||
sizeSb: Int
|
||||
}
|
||||
|
||||
enum DiskStatus {
|
||||
@@ -44,10 +46,8 @@ enum DiskStatus {
|
||||
|
||||
enum DiskType {
|
||||
Data
|
||||
}
|
||||
|
||||
enum DiskFsStatus {
|
||||
Mounted
|
||||
Parity
|
||||
Flash
|
||||
}
|
||||
|
||||
enum DiskFsType {
|
||||
@@ -56,4 +56,9 @@ enum DiskFsType {
|
||||
|
||||
enum DiskFsColor {
|
||||
green_on
|
||||
green_off
|
||||
yellow_on
|
||||
yellow_off
|
||||
red_on
|
||||
red_off
|
||||
}
|
||||
@@ -205,7 +205,7 @@
|
||||
|
||||
"@unraid/core@ssh://git@github.com:unraid/core.git":
|
||||
version "1.0.0"
|
||||
resolved "ssh://git@github.com:unraid/core.git#2a4e86642fe7054df8b7a9bfdb494cc9b35b9ec2"
|
||||
resolved "ssh://git@github.com:unraid/core.git#069303147c71d18ad608e5be3a565d83385b72ca"
|
||||
dependencies:
|
||||
better-stack-traces "^1.1.0"
|
||||
bolus "https://github.com/omgimalexis/bolus"
|
||||
|
||||
Reference in New Issue
Block a user