From 9719fdf5ccaea68ac364c98d20490b65ed2c51f5 Mon Sep 17 00:00:00 2001 From: Julien Fontanet Date: Sat, 23 Jul 2016 16:18:03 +0200 Subject: [PATCH] fix(sr.probe*): correctly prepare port param --- src/api/sr.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/api/sr.js b/src/api/sr.js index 6c9291a96..4f1e0ea15 100644 --- a/src/api/sr.js +++ b/src/api/sr.js @@ -1,3 +1,4 @@ +import { asInteger } from '../xapi/utils' import { ensureArray, forEach, @@ -344,7 +345,7 @@ export async function createIscsi ({ // if we give another port than default iSCSI if (port) { - deviceConfig.port = port + deviceConfig.port = asInteger(port) } const srRef = await xapi.call( @@ -405,7 +406,7 @@ export async function probeIscsiIqns ({ // if we give another port than default iSCSI if (port) { - deviceConfig.port = port + deviceConfig.port = asInteger(port) } let xml @@ -483,7 +484,7 @@ export async function probeIscsiLuns ({ // if we give another port than default iSCSI if (port) { - deviceConfig.port = port + deviceConfig.port = asInteger(port) } let xml @@ -562,7 +563,7 @@ export async function probeIscsiExists ({ // if we give another port than default iSCSI if (port) { - deviceConfig.port = port + deviceConfig.port = asInteger(port) } const xml = parseXml(await xapi.call('SR.probe', host._xapiRef, deviceConfig, 'lvmoiscsi', {}))