From 27f76c58e706233664a70504c220da3a55c0e06a Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Tue, 8 Jan 2008 05:07:17 +0000 Subject: Switch all parsing to outer scripts for Component git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4206 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Component.py | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'src/lib/Component.py') diff --git a/src/lib/Component.py b/src/lib/Component.py index fd9201cd1..c1f87dbe7 100644 --- a/src/lib/Component.py +++ b/src/lib/Component.py @@ -7,7 +7,6 @@ from base64 import decodestring import BaseHTTPServer, SimpleXMLRPCServer import Bcfg2.tlslite.errors import Bcfg2.tlslite.api -import Bcfg2.Options import Bcfg2.Client.Proxy as Proxy from Bcfg2.tlslite.TLSConnection import TLSConnection @@ -138,33 +137,18 @@ class Component(TLSServer, fork_funcs = [] child_limit = 32 - def __init__(self, setup): + def __init__(self, keyfile, password, location): # need to get addr - self.setup = setup self.shut = False signal.signal(signal.SIGINT, self.start_shutdown) signal.signal(signal.SIGTERM, self.start_shutdown) self.logger = logging.getLogger('Component') self.children = [] self.static = True - options = { - 'key' : Bcfg2.Options.SERVER_KEY, - 'location' : Bcfg2.Options.SERVER_LOCATION, - 'passwd' : Bcfg2.Options.SERVER_PASSWORD, - 'static' : Bcfg2.Options.SERVER_STATIC, - } - opts = Bcfg2.Options.OptionParser(options) - opts.parse([]) - location = opts['location'] uparsed = urlparse.urlparse(location)[1].split(':') sock_loc = (uparsed[0], int(uparsed[1])) - if not opts['key']: - print "No key specified in '%s'" % setup['configfile'] - raise SystemExit, 1 - keyfile = opts['key'] - - self.password = opts['passwd'] + self.password = password try: TLSServer.__init__(self, sock_loc, keyfile, CobaltXMLRPCRequestHandler) -- cgit v1.2.3-1-g7c22