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');