#!/usr/bin/python
-import plc
+from monitor.wrapper import plc
+from monitor import config
+import monitor.parser as parsermodule
api = plc.getAuthAPI()
import sys
import os
-import config
def getconf(hostname, force=False, media=None):
n = api.GetNodes(hostname)
f.write( api.AdmGenerateNodeConfFile(n[0]['node_id']) )
f.close()
print os.system("cd bootcd; ./build.sh -f %s.txt -t iso -o /plc/data/var/www/html/bootcds/%s.iso &> /dev/null" % ( hostname, hostname))
+ print "cd bootcd; ./build.sh -f %s.txt -t usb_partition -o /plc/data/var/www/html/bootcds/%s-partition.usb &> /dev/null" % ( hostname, hostname)
print os.system("cd bootcd; ./build.sh -f %s.txt -t usb_partition -o /plc/data/var/www/html/bootcds/%s-partition.usb &> /dev/null" % ( hostname, hostname))
else:
+ #print os.system("cd bootcd; ./build.sh -f %s.txt -t iso -o /plc/data/var/www/html/bootcds/%s.iso &> /dev/null" % ( hostname, hostname))
+ print "cd bootcd; ./build.sh -f %s.txt -t usb_partition -o /plc/data/var/www/html/bootcds/%s-partition.usb &> /dev/null" % ( hostname, hostname)
+ #print os.system("cd bootcd; ./build.sh -f %s.txt -t usb_partition -o /plc/data/var/www/html/bootcds/%s-partition.usb &> /dev/null" % ( hostname, hostname))
# assume that the images have already been generated..
pass
return args
if __name__ == '__main__':
- import parser as parsermodule
-
parser = parsermodule.getParser()
parser.set_defaults(media='both', force=False)
parser.add_option("", "--media", dest="media", metavar="usb, iso, both",
help="""Force the recreation of the usb images.""")
parser = parsermodule.getParser(['defaults'], parser)
- config = parsesrmodule.parse_args(parser)
+ config = parsermodule.parse_args(parser)
ret = {'url_list' : ''}
for i in config.args: