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
|
||||
: "SSD";
|
||||
|
||||
const extentAvailThreshold = this.options.iscsi.hasOwnProperty(
|
||||
let extentAvailThreshold = this.options.iscsi.hasOwnProperty(
|
||||
"extentAvailThreshold"
|
||||
)
|
||||
? this.options.iscsi.extentAvailThreshold
|
||||
? Number(this.options.iscsi.extentAvailThreshold)
|
||||
: null;
|
||||
|
||||
if (!(extentAvailThreshold > 0 && extentAvailThreshold <= 100)) {
|
||||
extentAvailThreshold = null;
|
||||
}
|
||||
|
||||
switch (apiVersion) {
|
||||
case 1: {
|
||||
response = await httpClient.get(
|
||||
|
|
|
|||
Loading…
Reference in New Issue