agg = node.__dict__.copy()
else:
agg = node.to_dict()
- agg.update(agg['plc_node_stats'])
+ if agg['plc_node_stats']:
+ agg.update(agg['plc_node_stats'])
if agg['install_date']:
agg['install_date'] = time.mktime(time.strptime(agg['install_date'], "%a %b %d %H:%M:%S %Y"))
if agg['kernel_version']:
if 'rpmvalue' in data and 'rpms' in data:
if agg['rpms']:
rpm_list = agg['rpms'].split()
- rpm_list = filter(lambda x: data['rpmvalue'] in x, rpm_list)
+ rpm_list = filter(lambda x: re.match(data['rpmvalue'], x, re.I),
+ rpm_list)
agg['rpms'] = " ".join(rpm_list)
query.append(agg)