9 from monitor.model import *
11 import parser as parsermodule
13 parser = parsermodule.getParser()
14 parser.set_defaults(node=None, rins=False, bootstate=None, endrecord=False)
15 parser.add_option("", "--backoff", dest="backoff", action="store_true",
16 help="Back off all penalties applied to a site.")
17 parser.add_option("", "--rins", dest="rins", action="store_true",
18 help="Back off all penalties applied to a site.")
19 parser.add_option("", "--bootstate", dest="bootstate",
20 help="set the bootstate for a node.")
21 parser = parsermodule.getParser(['defaults'], parser)
22 config = parsermodule.parse_args(parser)
24 for node in config.args:
28 print "Setting %s to bootstate %s" % ( node, config.bootstate )
29 api.UpdateNode(node, {'boot_state' : config.bootstate})
32 print "Setting %s to rins" % node
33 api.UpdateNode(node, {'boot_state' : 'rins'})
36 print "Enabling Slices & Slice Creation for %s" % node
37 plc.enableSlices(node)
38 plc.enableSliceCreation(node)
40 # plc_print_nodeinfo(plc_nodeinfo)
41 # fb_print_nodeinfo(fb_nodeinfo)