def _print_baremetal_nodes_list(nodes):
 def _parse_address(fields):
  macs = []
  for interface in fields.interfaces:
   macs.append(interface['address'])
  return ', '.join((('%s' % i) for i in macs))
 formatters = {'MAC Address': _parse_address}
 _translate_baremetal_node_keys(nodes)
 utils.print_list(nodes, ['ID', 'Host', 'Task State', 'CPUs', 'Memory_MB', 'Disk_GB', 'MAC Address', 'PM Address', 'PM Username', 'PM Password', 'Terminal Port'], formatters=formatters)

def _print_baremetal_nodes_list ( nodes ) : def _parse_address ( fields ) : macs = [ ] for interface in fields . interfaces : macs . append ( interface [ 'address' ] ) return ', ' . join ( ( ( '%s' % i ) for i in macs ) ) formatters = { 'MAC Address' : _parse_address } _translate_baremetal_node_keys ( nodes ) utils . print_list ( nodes , [ 'ID' , 'Host' , 'Task State' , 'CPUs' , 'Memory_MB' , 'Disk_GB' , 'MAC Address' , 'PM Address' , 'PM Username' , 'PM Password' , 'Terminal Port' ] , formatters = formatters )
print the list of baremetal nodes .