From c30a778a882a8fd7634e5b5056a498c9050a911b Mon Sep 17 00:00:00 2001 From: Jamie Zhuang Date: Mon, 19 Mar 2018 03:41:42 -0400 Subject: [PATCH] fix Graph.Dell.Configure.Idrac issue Graph.Dell.Configure.Idrac fails since it doesn't pass the parameters to the setIdracIP function. https://rackhd.atlassian.net/browse/RAC-6514 --- lib/jobs/racadm-control.js | 7 ++++++- lib/utils/job-utils/racadm-tool.js | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/jobs/racadm-control.js b/lib/jobs/racadm-control.js index bada3681..ae3e3846 100755 --- a/lib/jobs/racadm-control.js +++ b/lib/jobs/racadm-control.js @@ -46,7 +46,7 @@ function racadmToolJobFactory( this.nodeId = this.context.target; this.action = options.action; - this.userConfig = {user: options.serverUsername, password: options.serverPassword, + this.userConfig = {user: options.serverUsername, password: options.serverPassword, filePath: options.serverFilePath}; if (typeof options.forceReboot !== "undefined") { this.userConfig.forceReboot = options.forceReboot; @@ -54,6 +54,11 @@ function racadmToolJobFactory( if (typeof options.components !== "undefined") { this.userConfig = options.components; } + if (typeof options.ip !== "undefined") { + this.userConfig.ip = options.ip; + this.userConfig.netMask = options.netMask; + this.userConfig.gateway = options.gateway; + } } util.inherits(RacadmToolJob, BaseJob); diff --git a/lib/utils/job-utils/racadm-tool.js b/lib/utils/job-utils/racadm-tool.js index cd1d81aa..4dc37cf3 100755 --- a/lib/utils/job-utils/racadm-tool.js +++ b/lib/utils/job-utils/racadm-tool.js @@ -552,11 +552,12 @@ function racadmFactory( * @return {promise} */ RacadmTool.prototype.setIdracIP = function(host, user, password, data) { + var self = this; return Promise.try(function(){ if (Constants.Regex.IpAddress.test(data.ip) && Constants.Regex.IpAddress.test(data.netMask) && Constants.Regex.IpAddress.test(data.gateway)) { - return this.runCommand(host, user, password, + return self.runCommand(host, user, password, "setniccfg -s " + data.ip + " " + data.netMask + " " + data.gateway); }else{ throw new Errors.MyError('Invalid format of the input');