#
# Faiyaz Ahmed <faiyaza@cs.princeton.edu>
#
-# $Id: mailer.py,v 1.5 2007/01/17 16:03:30 faiyaza Exp $
+# $Id: mailer.py,v 1.6 2007/01/24 19:29:44 mef Exp $
from emailTxt import *
import smtplib
import config
out.close()
if not config.debug:
try:
+ print "Mailing %s" %to
server = smtplib.SMTP(MTA)
server.sendmail(FROM, to, msg)
server.quit()
#
# Faiyaz Ahmed <faiyaza@cs.princeton.edu
#
-# $Id: plc.py,v 1.1 2006/11/14 19:27:09 faiyaza Exp $
+# $Id: plc.py,v 1.13 2007/04/02 20:57:57 faiyaza Exp $
#
from emailTxt import *
if nodeinfo['pcu_ids']:
sitepcu = api.GetPCUs(auth.auth, nodeinfo['pcu_ids'])[0]
sitepcu[nodename] = nodeinfo["ports"][0]
- return False
+ return sitepcu
else:
logger.info("%s doesn't have PCU" % nodename)
- return sitepcu
-
+ return False
'''
Returns all site nodes for site id (loginbase).
["max_slices"])[0]['max_slices']
logger.info("Removing slice creation for site %s" % loginbase)
if not config.debug:
- api.UpdateSite(auth.auth, siteid, {'max_slices': 0})
+ api.UpdateSite(auth.auth, loginbase, {'max_slices': 0})
except Exception, exc:
logger.info("removeSliceCreation: %s" % exc)
#
# Faiyaz Ahmed <faiyaza@cs.princeton.edu>
#
-# $Id: policy.py,v 1.9 2007/01/17 19:46:40 faiyaza Exp $
+# $Id: policy.py,v 1.10 2007/01/24 19:29:44 mef Exp $
#
# Policy Engine.
logger.info("POLICY: %s in dbg, but acted on %s days ago" % (node, delta // SPERDAY))
return
logger.info("POLICY: Node in dbg - " + node)
- plc.nodeBootState([node, "rins"])
+ plc.nodeBootState(node, "rins")
# If it has a PCU
return reboot.reboot(node)