From 02c12de6c1077760e3cd965cb18b73ba48793bcb Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Mon, 26 Jan 2009 10:11:20 +0000 Subject: ~ cleaning up code base: dropping share/python --- share/python/console/shutdown.py | 39 --------------------------------------- share/python/grid_info.py | 12 ------------ 2 files changed, 51 deletions(-) delete mode 100755 share/python/console/shutdown.py delete mode 100755 share/python/grid_info.py (limited to 'share') diff --git a/share/python/console/shutdown.py b/share/python/console/shutdown.py deleted file mode 100755 index 65f8255..0000000 --- a/share/python/console/shutdown.py +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/python -# -*- encoding: utf-8 -*- - -import ConfigParser -import xmlrpclib -import optparse -import os.path - -if __name__ == '__main__': - parser = optparse.OptionParser() - parser.add_option('-c', '--config', dest = 'config', help = 'config file', metavar = 'CONFIG') - parser.add_option('-s', '--server', dest = 'server', help = 'URI for the grid server', metavar = 'SERVER') - parser.add_option('-p', '--password', dest = 'password', help = 'password for the grid server', metavar = 'PASSWD') - (options, args) = parser.parse_args() - - configFile = options.config - if not configFile: - if os.path.isfile(os.path.expanduser('~/.opensim-console.rc')): - configFile = os.path.expanduser('~/.opensim-console.rc') - if not configFile: - parser.error('missing option config') - sys.exit(1) - - config = ConfigParser.ConfigParser() - config.readfp(open(configFile)) - - server = config.get('opensim', 'server') - password = config.get('opensim', 'password') - - if options.server: server = options.server - if options.password: password = options.password - - gridServer = xmlrpclib.Server(server) - res = gridServer.admin_shutdown({'password': password}) - - if res['success'] == 'true': - print 'shutdown of %s initiated' % server - else: - print 'shutdown of %s failed' % server diff --git a/share/python/grid_info.py b/share/python/grid_info.py deleted file mode 100755 index 8a89328..0000000 --- a/share/python/grid_info.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/python -# -*- encoding: utf-8 -*- -import xmlrpclib - -# XML-RPC URL (http_listener_port) -gridServerURL = 'http://127.0.0.1:9000' - -# instantiate server object -gridServer = xmlrpclib.Server(gridServerURL) - -# invoke admin_alert: requires password and message -print gridServer.get_grid_info({}) -- cgit v1.1