+ print 'UP: route add -net %(ip)s gw %(gateway)s netmask %(mascara)s dev %(iface)s metric %(metrica)s' % ruta
+ os.system('route add -net %(ip)s gw %(gateway)s netmask %(mascara)s dev %(iface)s metric %(metrica)s' % ruta)
+
+def down(host, fd):
+ hosts = parse(fd)
+ for iface in hosts[host]['ifaces']:
+ print 'DOWN: ifconfig %(iface)s down' % iface
+ if iface['iface'].startswith('ppp'):
+ os.system('killall pppd')
+ else:
+ os.system('ifconfig %(iface)s down' % iface)
+
+def list(fd):
+ hosts = parse(fd)
+ for host in hosts.keys():
+ print host