From 7b6e66a10fdf172bd877fb8a51ef4e6a08d3b6ae Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Fri, 3 Jul 2009 00:16:59 +0000 Subject: [PATCH] start moving names from geni to sfa --- INSTALL.txt | 8 ++++---- Makefile | 4 ++-- config/{geni-config-tty => sfa-config-tty} | 10 +++++----- config/{geni_config => sfa_config} | 0 geni/alt_aggregate.py | 2 +- geni/init.d/{geni => sfa} | 2 +- geni/slicemgr.py | 2 +- geni/util/api.py | 3 ++- geni/util/config.py | 2 +- geniwrapper.spec | 4 ++-- setup.py | 8 ++++---- 11 files changed, 23 insertions(+), 22 deletions(-) rename config/{geni-config-tty => sfa-config-tty} (97%) rename config/{geni_config => sfa_config} (100%) rename geni/init.d/{geni => sfa} (98%) diff --git a/INSTALL.txt b/INSTALL.txt index 14f41cfa..12beb110 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -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 diff --git a/Makefile b/Makefile index 2c564a49..cd53bb50 100644 --- 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 diff --git a/config/geni-config-tty b/config/sfa-config-tty similarity index 97% rename from config/geni-config-tty rename to config/sfa-config-tty index 44d213ff..348b9216 100755 --- a/config/geni-config-tty +++ b/config/sfa-config-tty @@ -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: diff --git a/config/geni_config b/config/sfa_config similarity index 100% rename from config/geni_config rename to config/sfa_config diff --git a/geni/alt_aggregate.py b/geni/alt_aggregate.py index 3dee031b..0f65dbd9 100644 --- a/geni/alt_aggregate.py +++ b/geni/alt_aggregate.py @@ -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 diff --git a/geni/init.d/geni b/geni/init.d/sfa similarity index 98% rename from geni/init.d/geni rename to geni/init.d/sfa index 55681c66..88adf053 100755 --- a/geni/init.d/geni +++ b/geni/init.d/sfa @@ -10,7 +10,7 @@ # # Source config -. /etc/geni/geni_config +. /etc/geni/sfa_config # source function library . /etc/init.d/functions diff --git a/geni/slicemgr.py b/geni/slicemgr.py index 9ecd59ec..6c7a263d 100644 --- a/geni/slicemgr.py +++ b/geni/slicemgr.py @@ -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' diff --git a/geni/util/api.py b/geni/util/api.py index fc0615de..07a4a63f 100644 --- a/geni/util/api.py +++ b/geni/util/api.py @@ -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 diff --git a/geni/util/config.py b/geni/util/config.py index 68c38f01..130388e6 100644 --- a/geni/util/config.py +++ b/geni/util/config.py @@ -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 diff --git a/geniwrapper.spec b/geniwrapper.spec index 4f3bc927..6cc2972e 100644 --- a/geniwrapper.spec +++ b/geniwrapper.spec @@ -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* diff --git a/setup.py b/setup.py index a429f6e8..333b539b 100755 --- 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 -- 2.43.0