lib/_cli/cli-util.js
function (hostname, command) {
    var hostInfo = {hostname: hostname, user: '', password: ''}
    var hostInfoKeys = ['port', 'user', 'password', 'truststore']
    hostInfoKeys.forEach(function (hostInfoKey) {
      if (command[hostInfoKey]) {
        hostInfo[hostInfoKey] = command[hostInfoKey]
        delete command[hostInfoKey]
      }
    })
    return hostInfo
  }
function (hostname, command) {
    var hostInfo = {hostname: hostname, user: '', password: ''}
    var hostInfoKeys = ['port', 'user', 'password', 'truststore']
    hostInfoKeys.forEach(function (hostInfoKey) {
      if (command[hostInfoKey]) {
        hostInfo[hostInfoKey] = command[hostInfoKey]
        delete command[hostInfoKey]
      }
    })
    return hostInfo
  }
function ( hostname , command ) { var hostInfo = { hostname : hostname , user : '' , password : '' } var hostInfoKeys = [ 'port' , 'user' , 'password' , 'truststore' ] hostInfoKeys . forEach ( function ( hostInfoKey ) { if ( command [ hostInfoKey ] ) { hostInfo [ hostInfoKey ] = command [ hostInfoKey ] delete command [ hostInfoKey ] } } ) return hostInfo }
Extract host info from the supplied Commander-based command. Host-info
keys are removed from the command.
@param {String} hostname - Name of the management service host.
@param {Command} command - The Commander command to extract host info
from.
@returns {ManagementServiceHostInfo} The host info.
Extract host info from the supplied Commander - based command . Host - info keys are removed from the command .