def update_raid_info(node, raid_config):
    """Update the node's information based on the RAID config.

    This method updates the node's information to make use of the configured
    RAID for scheduling purposes (through properties['capabilities'] and
    properties['local_gb']) and deploying purposes (using
    properties['root_device']).

    :param node: a node object
    :param raid_config: The dictionary containing the current RAID
        configuration.
    :raises: InvalidParameterValue, if 'raid_config' has more than
        one root volume or if node.properties['capabilities'] is malformed.
    """
    current = raid_config.copy()
    current['last_updated'] = str(datetime.datetime.utcnow())
    node.raid_config = current

    # Current RAID configuration can have 0 or 1 root volumes. If there
    # are > 1 root volumes, then it's invalid.  We check for this condition
    # while accepting target RAID configuration, but this check is just in
    # place, if some drivers pass > 1 root volumes to this method.
    root_logical_disk = _check_and_return_root_volumes(raid_config)
    if root_logical_disk:
        # Update local_gb and root_device_hint
        properties = node.properties
        properties['local_gb'] = root_logical_disk['size_gb']
        try:
            properties['root_device'] = (
                root_logical_disk['root_device_hint'])
        except __HOLE__:
            pass
        properties['capabilities'] = utils.get_updated_capabilities(
            properties.get('capabilities', ''),
            {'raid_level': root_logical_disk['raid_level']})
        node.properties = properties

    node.save()
dataset/ETHPy150Open openstack/ironic/ironic/common/raid.py/update_raid_info