'Helper method to parse the node\'s properties.'

def _parse_node_properties(self, node):

    properties = {}
    for prop in ('cpus', 'memory_mb', 'local_gb'):
        try:
            properties[prop] = int(node.properties.get(prop, 0))
        except (TypeError, ValueError):
            LOG.warning('Node    %(uuid)s    has    a    malformed    "%(prop)s".    It    should    be    an    integer.', {'uuid': node.uuid, 'prop': prop})
            properties[prop] = 0
    raw_cpu_arch = node.properties.get('cpu_arch', None)
    try:
        cpu_arch = obj_fields.Architecture.canonicalize(raw_cpu_arch)
    except exception.InvalidArchitectureName:
        cpu_arch = None
    if (not cpu_arch):
        LOG.warning("cpu_arch    not    defined    for    node    '%s'", node.uuid)
    properties['cpu_arch'] = cpu_arch
    properties['raw_cpu_arch'] = raw_cpu_arch
    properties['capabilities'] = node.properties.get('capabilities')
    return properties
