def parse_driver_info(node):
    driver_info = node.driver_info
    parsed_driver_info = {}

    error_msgs = []
    for param in REQUIRED_PROPERTIES:
        try:
            parsed_driver_info[param] = str(driver_info[param])
        except KeyError:
            error_msgs.append(_("'%s' not supplied to DracDriver.") % param)
        except UnicodeEncodeError:
            error_msgs.append(_("'%s' contains non-ASCII symbol.") % param)

    parsed_driver_info['drac_port'] = driver_info.get('drac_port', 443)

    try:
        parsed_driver_info['drac_path'] = str(driver_info.get('drac_path',
                                                              '/wsman'))
    except UnicodeEncodeError:
        error_msgs.append(_("'drac_path' contains non-ASCII symbol."))

    try:
        parsed_driver_info['drac_protocol'] = str(
            driver_info.get('drac_protocol', 'https'))

        if parsed_driver_info['drac_protocol'] not in ['http', 'https']:
            error_msgs.append(_("'drac_protocol' must be either 'http' or "
                                "'https'."))
    except UnicodeEncodeError:
        error_msgs.append(_("'drac_protocol' contains non-ASCII symbol."))

    if error_msgs:
        msg = (_('The following errors were encountered while parsing '
                 'driver_info:\n%s') % '\n'.join(error_msgs))
        raise exception.InvalidParameterValue(msg)

    port = parsed_driver_info['drac_port']
    parsed_driver_info['drac_port'] = utils.validate_network_port(
        port, 'drac_port')

    return parsed_driver_info
The title to be displayed in the titlebar of the terminal.
dataset/ETHPy150Open openstack/ironic/ironic/drivers/modules/drac/common.py/parse_driver_info--crossover with--dataset/ETHPy150Open jonathanslenders/pymux/pymux/main.py/Pymux.get_title