go for a unique config URL for the federica xmlrpc service
Thierry Parmentelat [Fri, 24 Feb 2012 11:37:30 +0000 (12:37 +0100)]
config/default_config.xml
sfa/federica/fdshell.py

index eeca137..b08f738 100644 (file)
@@ -282,30 +282,11 @@ Thierry Parmentelat
       <description>The settings that tell this SFA instance how to interact with the FEDERICA testbed.</description>
 
       <variablelist>
-       <variable id="user" type="string">
-         <name>FEDERICA login name for an admin user; SFA will carry on operations under this account.</name>
-         <value>root</value>
-         <description></description>
-       </variable>
-
-       <variable id="password" type="string">
-         <name>Password</name>
-         <value>rootpassword</value>
-         <description>The PLC password for SFA_PLC_USER.</description>
-       </variable>
-
-       <variable id="hostname" type="string">
-         <name>XMLRPC hostname</name>
-         <value>federica.net</value>
-         <description>Hostname for the federica xmlrpc interface.</description>
-       </variable>
-
-       <variable id="port" type="string">
-         <name>XMLRPC port number</name>
-         <value>10000</value>
-         <description>Port number for the federica xmlrpc interface.</description>
+       <variable id="url" type="string">
+         <name>XMLRPC URL</name>
+         <value>https://root:password@federica.sfa.wrapper.com:8443/fedewrapper/xmlrpc/</value>
+         <description>URL for the federica xmlrpc API; login and password need to be set like in http://login:password@hostname:port/the/path </description>
        </variable>
-
       </variablelist>
     </category>
 
index 7195b56..1b290b0 100644 (file)
@@ -18,11 +18,7 @@ class FdShell:
                     ]
 
     def __init__ ( self, config ) :
-        # xxx to be configurable
-        SFA_FEDERICA_URL = "http://%s:%s@%s:%s/"%\
-            (config.SFA_FEDERICA_USER,config.SFA_FEDERICA_PASSWORD,
-             config.SFA_FEDERICA_HOSTNAME,config.SFA_FEDERICA_PORT)
-        url=SFA_FEDERICA_URL
+        url=config.SFA_FEDERICA_URL
         # xxx not sure if java xmlrpc has support for None
         # self.proxy = xmlrpclib.Server(url, verbose = False, allow_none = True)
         # xxx turn on verbosity