Skip to content
This repository has been archived by the owner on Sep 23, 2020. It is now read-only.

Commit

Permalink
Added nimbus-configure --autoconfig option
Browse files Browse the repository at this point in the history
Just a passthrough to the autoconfig.sh script
  • Loading branch information
labisso committed Jul 9, 2010
1 parent 5b7adc5 commit 063240b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions home/libexec/nimbusconfigure.py
Expand Up @@ -182,6 +182,9 @@ class ARGS:
GRIDFTPENV = "-g"
GRIDFTPENV_HELP = "Path to GridFTP $GLOBUS_LOCATION"

AUTOCONFIG_LONG= "--autoconfig"
AUTOCONFIG_HELP = "Run the Nimbus autoconfig tool to test VMM communication"

IMPORTDB_LONG= "--import-db"
IMPORTDB_HELP = "Import a Nimbus accounting database from another install"

Expand Down Expand Up @@ -224,6 +227,10 @@ def parsersetup():
parser = optparse.OptionParser(version=ver, usage=usage)

group = optparse.OptionGroup(parser, "Actions", "-------------")
group.add_option(ARGS.AUTOCONFIG_LONG,
action="store_true", dest="autoconfig",
default=False, help=ARGS.AUTOCONFIG_HELP)

group.add_option(ARGS.IMPORTDB_LONG,
dest="importdb", metavar="PATH", help=ARGS.IMPORTDB_HELP)

Expand Down Expand Up @@ -659,6 +666,15 @@ def main(argv=None):
if opts.gridftpenv:
print_gridftpenv(setup, opts.gridftpenv)
return 0
elif opts.autoconfig:
cmd = os.path.join(setup.gtdir,
'share/nimbus-autoconfig/autoconfig.sh')
if not (os.path.exists(cmd) and os.access(cmd, os.X_OK)):
print >>sys.stderr, "\nERROR: autoconfig script not found or not executable: " + cmd
return 1
os.system(cmd)
return 0

elif opts.importdb:
import_db(setup, opts.importdb)
return 0
Expand Down

0 comments on commit 063240b

Please sign in to comment.