X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=getconf.py;h=1008c74ffcbfc255f9571d0844cf81a2ac8d942a;hb=refs%2Fheads%2F1.0;hp=205f0ffee9a8b8e66a2b3f2c0fdd479185cbc29a;hpb=c3f2afdc81c6711c3825c82e2cd4970671575438;p=monitor.git diff --git a/getconf.py b/getconf.py index 205f0ff..1008c74 100755 --- a/getconf.py +++ b/getconf.py @@ -4,7 +4,7 @@ import plc api = plc.getAuthAPI() import sys import os -import monitorconfig +import config def getconf(hostname, force=False, media=None): n = api.GetNodes(hostname) @@ -21,16 +21,16 @@ def getconf(hostname, force=False, media=None): args = {} if not media: - args['url_list'] = " http://%s/bootcds/%s-partition.usb\n" % (monitorconfig.MONITOR_HOSTNAME, hostname) - args['url_list'] += " http://%s/bootcds/%s.iso" % (monitorconfig.MONITOR_HOSTNAME, hostname) + args['url_list'] = " http://%s/bootcds/%s-partition.usb\n" % (config.MONITOR_HOSTNAME, hostname) + args['url_list'] += " http://%s/bootcds/%s.iso" % (config.MONITOR_HOSTNAME, hostname) else: if media == "usb": - args['url_list'] = " http://%s/bootcds/%s-partition.usb\n" % (monitorconfig.MONITOR_HOSTNAME, hostname) + args['url_list'] = " http://%s/bootcds/%s-partition.usb\n" % (config.MONITOR_HOSTNAME, hostname) elif media == "iso": - args['url_list'] = " http://%s/bootcds/%s.iso" % (monitorconfig.MONITOR_HOSTNAME, hostname) + args['url_list'] = " http://%s/bootcds/%s.iso" % (config.MONITOR_HOSTNAME, hostname) else: - args['url_list'] = " http://%s/bootcds/%s-partition.usb\n" % (monitorconfig.MONITOR_HOSTNAME, hostname) - args['url_list'] += " http://%s/bootcds/%s.iso" % (monitorconfig.MONITOR_HOSTNAME, hostname) + args['url_list'] = " http://%s/bootcds/%s-partition.usb\n" % (config.MONITOR_HOSTNAME, hostname) + args['url_list'] += " http://%s/bootcds/%s.iso" % (config.MONITOR_HOSTNAME, hostname) return args @@ -46,7 +46,7 @@ if __name__ == '__main__': 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: