start moving names from geni to sfa
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Fri, 3 Jul 2009 00:16:59 +0000 (00:16 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Fri, 3 Jul 2009 00:16:59 +0000 (00:16 +0000)
INSTALL.txt
Makefile
config/sfa-config-tty [moved from config/geni-config-tty with 97% similarity]
config/sfa_config [moved from config/geni_config with 100% similarity]
geni/alt_aggregate.py
geni/init.d/sfa [moved from geni/init.d/geni with 98% similarity]
geni/slicemgr.py
geni/util/api.py
geni/util/config.py
geniwrapper.spec
setup.py

index 14f41cf..12beb11 100644 (file)
@@ -15,7 +15,7 @@ PLC_ROOT_USER = root@test.onelab.eu
 Enter command (u for usual changes, w to save, ? for help) s PLC_ROOT_PASSWORD
 PLC_ROOT_PASSWORD = test++
 ---
-geni-config-tty
+sfa-config-tty
 
 * set GENI_PLC_USER            to PLC_ROOT_USER 
 * set GENI_PLC_PASSWORD                to PLC_ROOT_PASSWORD
@@ -34,9 +34,9 @@ NOTICE:  table "geni$plc" does not exist, skipping
   inserting authority record for plc
 
 --- 
-run geni-config-tty again - to initialize /etc/geni/authorities/plc/plc.pkey
+run sfa-config-tty again - to initialize /etc/geni/authorities/plc/plc.pkey
 
-[2009.06.09--1l-f8-32-vplc07] / # geni-config-tty 
+[2009.06.09--1l-f8-32-vplc07] / # sfa-config-tty 
 Enter command (u for usual changes, w to save, ? for help) q
                 /etc/geni/authorities/server.key
 copied from     /etc/geni/authorities/plc/plc.pkey
@@ -63,7 +63,7 @@ First run:
 python gimport.py
 
 # start the services
-/etc/init.d/geniwrapper start 
+service sfa start
 
 or 
 
index 2c564a4..cd53bb5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -40,7 +40,7 @@ python-clean:
 
 # are the .java files used ?
 tags:  
-       find . -name '*.py' -o -name '*.sh' -o -name '*.ecore'  | grep -v '/\.svn/' | xargs etags
+       find . -type f | egrep -v '/\.svn/|\.py[co]$$|TAGS' | xargs etags
 .PHONY: tags
 
 
@@ -117,7 +117,7 @@ ifeq (,$(SSHURL))
        @exit 1
 else
        +$(RSYNC) ./geni/ $(SSHURL)/usr/lib/python2.5/site-packages/geni/
-       +$(RSYNC) ./config/geni-config-tty $(SSHURL)/usr/bin
+       +$(RSYNC) ./config/sfa-config-tty $(SSHURL)/usr/bin
        $(SSHCOMMAND) exec service geni restart
 endif
 
similarity index 97%
rename from config/geni-config-tty
rename to config/sfa-config-tty
index 44d213f..348b921 100755 (executable)
@@ -128,7 +128,7 @@ def validate(changes):
     return changes                            
 
 def get_defaults():
-    geni_config = Config()
+    sfa_config = Config()
     plc_vars = {'PLC_API_MAINTENANCE_PASSWORD': 'GENI_PLC_PASSWORD',
                 'PLC_API_MAINTENANCE_USER': 'GENI_PLC_USER'
                }
@@ -139,9 +139,9 @@ def get_defaults():
         plc_config = None
     
     defaults = {}
-    for var in dir(geni_config):
+    for var in dir(sfa_config):
         if var.startswith('GENI'):
-            value = eval("geni_config.%s" % var)
+            value = eval("sfa_config.%s" % var)
             defaults[var] = value
 
     # some defaults come from plc_config
@@ -264,7 +264,7 @@ def setup_server_key(config_dict):
     try:
         distutils.file_util.copy_file(src=new_server_key, dst=old_server_key, verbose=1)
         print "\t\t%(old_server_key)s\ncopied from\t%(new_server_key)s" % locals()
-    # this is expected when running geni-config-tty for the first time (before gimport.py)
+    # this is expected when running this tool for the first time (before gimport.py)
     except:
         print "Could not create %(old_server_key)s - ignore if you haven't run gimport yet"%locals()
     
@@ -287,7 +287,7 @@ def main ():
         parser.error("too many arguments")
 
     config_dir = parser.values.config_dir
-    config_file = os.sep.join([config_dir, 'geni_config'])
+    config_file = os.sep.join([config_dir, 'sfa_config'])
     defaults = get_defaults()
     # if -d is specified dont prompt, just configure with defaults
     if '-d' in argv:
similarity index 100%
rename from config/geni_config
rename to config/sfa_config
index 3dee031..0f65dbd 100644 (file)
@@ -42,7 +42,7 @@ class AltAggregate(GeniServer):
     # @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, config = "/usr/share/geniwrapper/geni/util/geni_config"):
+    def __init__(self, ip, port, key_file, cert_file, config = "/etc/geni/sfa_config"):
         GeniServer.__init__(self, ip, port, key_file, cert_file)
         self.key_file = key_file
         self.cert_file = cert_file
similarity index 98%
rename from geni/init.d/geni
rename to geni/init.d/sfa
index 55681c6..88adf05 100755 (executable)
@@ -10,7 +10,7 @@
 #
 
 # Source config
-. /etc/geni/geni_config
+. /etc/geni/sfa_config
 
 # source function library
 . /etc/init.d/functions
index 9ecd59e..6c7a263 100644 (file)
@@ -22,6 +22,6 @@ class SliceMgr(GeniServer):
     # @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, config = "/usr/share/geniwrapper/geni/util/geni_config"):
+    def __init__(self, ip, port, key_file, cert_file, config = "/etc/geni/sfa_config"):
         GeniServer.__init__(self, ip, port, key_file, cert_file)
         self.server.interface = 'slicemgr'      
index fc0615d..07a4a63 100644 (file)
@@ -100,7 +100,8 @@ class GeniAPI:
     import geni.methods
     methods = geni.methods.all
     
-    def __init__(self, config = "/etc/geni/geni_config", encoding = "utf-8", peer_cert = None, interface = None, key_file = None, cert_file = None):
+    def __init__(self, config = "/etc/geni/sfa_config", encoding = "utf-8", 
+                 peer_cert = None, interface = None, key_file = None, cert_file = None):
         self.encoding = encoding
 
         # Better just be documenting the API
index 68c38f0..130388e 100644 (file)
@@ -35,7 +35,7 @@ class Config:
     fast but no type conversions.
     """
 
-    def __init__(self, filepath = "/etc/geni/geni_config"):
+    def __init__(self, filepath = "/etc/geni/sfa_config"):
         # Load plc_config
 
         loaded = False
index 4f3bc92..6cc2972 100644 (file)
@@ -70,11 +70,11 @@ rm -rf $RPM_BUILD_ROOT
 
 %files plc
 %defattr(-,root,root)
-%config (noreplace) /etc/geni/geni_config
+%config (noreplace) /etc/geni/sfa_config
 %config (noreplace) /etc/geni/aggregates.xml
 %config (noreplace) /etc/geni/registries.xml
 /etc/init.d/geni
-%{_bindir}/geni-config-tty
+%{_bindir}/sfa-config-tty
 %{_bindir}/gimport.py*
 %{_bindir}/plc.py*
 
index a429f6e..333b539 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -10,7 +10,7 @@ from distutils.core import setup, Extension
 
 scripts = [ 'geni/gimport.py', 
             'geni/plc.py', 
-            'config/geni-config-tty',
+            'config/sfa-config-tty',
             'cmdline/sfi.py', 
             'cmdline/getNodes.py',
             'cmdline/getRecord.py',
@@ -19,8 +19,8 @@ scripts = [ 'geni/gimport.py',
             ]
 package_dirs = ['geni', 'geni/util', 'geni/methods']
 data_files = [ ('/etc/geni/', ['config/aggregates.xml', 'config/registries.xml', 
-                               'config/geni_config', 'config/sfi_config']),
-               ('/etc/init.d/', ['geni/init.d/geni']),
+                               'config/sfa_config', 'config/sfi_config']),
+               ('/etc/init.d/', ['geni/init.d/sfa']),
                ('/var/www/html/wsdl', [ 'wsdl/sfa.wsdl' ] ),
                ]
 symlinks = ['/usr/share/geniwrapper']
@@ -30,7 +30,7 @@ if sys.argv[1] in ['uninstall', 'remove', 'delete', 'clean']:
     python_path = sys.path
     site_packages_path = [ path + os.sep + 'geni' for path in python_path if path.endswith('site-packages')]
     remove_dirs = ['/etc/geni/'] + site_packages_path
-    remove_files = ['/usr/bin/gimport.py', '/usr/bin/plc.py', '/usr/bin/sfi.py', '/usr/bin/geni-config-tty'] + \
+    remove_files = ['/usr/bin/gimport.py', '/usr/bin/plc.py', '/usr/bin/sfi.py', '/usr/bin/sfa-config-tty'] + \
                     symlinks + initscripts
     
     # remove files