def _exec_ipmitool(driver_info, command):
    """Execute the ipmitool command.

    This uses the lanplus interface to communicate with the BMC device driver.

    :param driver_info: the ipmitool parameters for accessing a node.
    :param command: the ipmitool command to be executed.

    """
    ipmi_cmd = ("ipmitool -H %(address)s"
                " -I lanplus -U %(user)s -P %(passwd)s %(cmd)s"
                % {'address': driver_info['address'],
                   'user': driver_info['username'],
                   'passwd': driver_info['password'],
                   'cmd': command})

    out = None
    try:
        out = subprocess.check_output(ipmi_cmd, shell=True)
    except Exception:
        pass
    return out
def _exec_ipmitool ( driver_info , command ) : ipmi_cmd = ( "ipmitool -H %(address)s" " -I lanplus -U %(user)s -P %(passwd)s %(cmd)s" % { 'address' : driver_info [ 'address' ] , 'user' : driver_info [ 'username' ] , 'passwd' : driver_info [ 'password' ] , 'cmd' : command } ) out = None try : out = subprocess . check_output ( ipmi_cmd , shell = True ) except Exception : pass return out
Execute the ipmitool command.

    This uses the lanplus interface to communicate with the BMC device driver.

    :param driver_info: the ipmitool parameters for accessing a node.
    :param command: the ipmitool command to be executed.