removed another bunch of references to geni
[sfa.git] / sfacomponent / server / component.py
1 #
2 # Component is a SfaServer that implements the Component interface
3 #
4 ### $Id: 
5 ### $URL: 
6 #
7
8 import tempfile
9 import os
10 import time
11 import sys
12
13 from sfa.util.server import SfaServer
14 from sfacomponent.plc.api import ComponentAPI
15  
16 # GeniLight client support is optional
17 try:
18     from egeni.geniLight_client import *
19 except ImportError:
20     GeniClientLight = None            
21
22 ##
23 # Component is a SfaServer that serves component operations.
24
25 class Component(SfaServer):
26     ##
27     # Create a new registry object.
28     #
29     # @param ip the ip address to listen on
30     # @param port the port to listen on
31     # @param key_file private key filename of registry
32     # @param cert_file certificate filename containing public key (could be a GID file)
33
34     def __init__(self, ip, port, key_file, cert_file):
35         SfaServer.__init__(self, ip, port, key_file, cert_file)
36         # re-initialize the servers api as Component api  
37         self.server.api = ComponentAPI(interface='component', key_file=key_file, cert_file=cert_file)  
38         self.server.interface = 'component'