From 5614016f9bbcf3bb597fcede399f3ad987c3bf18 Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Wed, 25 Nov 2009 20:24:31 +0000 Subject: [PATCH] moving component server here --- sfa/server/component.py | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 sfa/server/component.py diff --git a/sfa/server/component.py b/sfa/server/component.py new file mode 100644 index 00000000..ab76961d --- /dev/null +++ b/sfa/server/component.py @@ -0,0 +1,38 @@ +# +# Component is a GeniServer that implements the Component interface +# +### $Id: +### $URL: +# + +import tempfile +import os +import time +import sys + +from sfa.util.geniserver import GeniServer +from sfacomponent.plc.api import ComponentAPI + +# GeniLight client support is optional +try: + from egeni.geniLight_client import * +except ImportError: + GeniClientLight = None + +## +# Component is a GeniServer that serves component operations. + +class Component(GeniServer): + ## + # Create a new registry object. + # + # @param ip the ip address to listen on + # @param port the port to listen on + # @param key_file private key filename of registry + # @param cert_file certificate filename containing public key (could be a GID file) + + def __init__(self, ip, port, key_file, cert_file): + GeniServer.__init__(self, ip, port, key_file, cert_file) + # re-initialize the servers api as Component api + self.server.api = ComponentAPI(interface='component', key_file=key_file, cert_file=cert_file) + self.server.interface = 'component' -- 2.43.0