code: def __getIP(self, public):
          
  
          maybeNot = (lambda x: x) if public else (lambda x: not x)
          nets_id = [net.id for net in self.networks if maybeNot(net.isPublic())]
          for s in self.systems:
              i = 0
              while True:
                  value = s.getValue("net_interface.%d.connection" % i)
                  if not value:
                      break
                  if value in nets_id:
                      ip = s.getValue("net_interface.%d.ip" % i)
                      if ip:
                          return ip
                  i += 1
          return None
docs: Return the first net_interface.%d.ip for a system in a public/private network.