better handling of extentAvailThreshold
This commit is contained in:
parent
1f8bb9322c
commit
b519cf5742
|
|
@ -295,12 +295,16 @@ class FreeNASDriver extends ControllerZfsSshBaseDriver {
|
||||||
? this.options.iscsi.extentRpm
|
? this.options.iscsi.extentRpm
|
||||||
: "SSD";
|
: "SSD";
|
||||||
|
|
||||||
const extentAvailThreshold = this.options.iscsi.hasOwnProperty(
|
let extentAvailThreshold = this.options.iscsi.hasOwnProperty(
|
||||||
"extentAvailThreshold"
|
"extentAvailThreshold"
|
||||||
)
|
)
|
||||||
? this.options.iscsi.extentAvailThreshold
|
? Number(this.options.iscsi.extentAvailThreshold)
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
|
if (!(extentAvailThreshold > 0 && extentAvailThreshold <= 100)) {
|
||||||
|
extentAvailThreshold = null;
|
||||||
|
}
|
||||||
|
|
||||||
switch (apiVersion) {
|
switch (apiVersion) {
|
||||||
case 1: {
|
case 1: {
|
||||||
response = await httpClient.get(
|
response = await httpClient.get(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue