2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-26 03:19:48 +00:00

Include absent devices in the json of nodeinventory

This commit is contained in:
Jarrod Johnson 2018-05-11 14:24:47 -04:00
parent efd5732682
commit b877a95645

View File

@ -130,8 +130,13 @@ try:
for inv in res['databynode'][node]['inventory']:
prefix = inv['name']
if not inv['present']:
if not filters and not options.json:
print '{0}: {1}: Not Present'.format(node, prefix)
if not filters:
if options.json:
if node not in databynode:
databynode[node] = {}
databynode[node][prefix] = inv
else:
print '{0}: {1}: Not Present'.format(node, prefix)
continue
info = inv['information']
info.pop('board_extra', None)