-def nodegroup_display(node, fb, conf=None):
- if node['hostname'] in fb['nodes']:
- node['current'] = get_current_state(fb['nodes'][node['hostname']]['values'])
- else:
- node['current'] = 'none'
-
- if fb['nodes'][node['hostname']]['values'] == []:
- return ""
-
- s = fb['nodes'][node['hostname']]['values']['kernel'].split()
+def getvalue(fb, path):
+ indexes = path.split("/")
+ values = fb
+ for index in indexes:
+ if index in values:
+ values = values[index]
+ else:
+ return None
+ return values
+
+def nmap_port_status(status):
+ ps = {}
+ l_nmap = status.split()
+ ports = l_nmap[4:]
+
+ continue_probe = False
+ for port in ports:
+ results = port.split('/')
+ ps[results[0]] = results[1]
+ if results[1] == "open":
+ continue_probe = True
+ return (ps, continue_probe)
+
+
+def nodegroup_display(node, fbdata, conf=None):
+ node['current'] = get_current_state(fbdata)
+
+ s = fbdata['kernel_version'].split()