From 415cded3064bd4e92d98a413c3db90b01533abed Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Fri, 3 Jul 2009 00:52:38 +0000 Subject: [PATCH] renamings going on --- CHANGES-0.2-to-0.8.txt | 28 ++++++++++++++++++++++++++ INSTALL.txt | 10 ++++----- cmdline/genidump.py | 3 ++- cmdline/getNodes.py | 1 + cmdline/getRecord.py | 1 + cmdline/sfi.py | 3 ++- config/sfa-config-tty | 2 +- geni/aggregate.py | 4 ++-- geni/init.d/sfa | 8 ++++---- geni/methods/delete_slice.py | 3 ++- geni/methods/list.py | 1 + geni/methods/resolve.py | 3 ++- geni/registry.py | 7 ++++--- geni/{gimport.py => sfa-import-plc.py} | 0 geni/{plc.py => sfa-plc.py} | 4 ++-- geni/util/nodes.py | 2 +- geniwrapper.spec | 4 ++-- setup.py | 6 +++--- 18 files changed, 63 insertions(+), 27 deletions(-) create mode 100644 CHANGES-0.2-to-0.8.txt rename geni/{gimport.py => sfa-import-plc.py} (100%) rename geni/{plc.py => sfa-plc.py} (96%) diff --git a/CHANGES-0.2-to-0.8.txt b/CHANGES-0.2-to-0.8.txt new file mode 100644 index 00000000..5660e582 --- /dev/null +++ b/CHANGES-0.2-to-0.8.txt @@ -0,0 +1,28 @@ +changes between 0.2 and 0.8 from a user's perspective + +-------------------- +- 3 packages named +-- sfa (libraries) +-- sfa-plc (server side) +-- sfa-client (client-side) + +-------------------- new names for commands +gimport.py -> sfa-import-plc.py +plc.py -> sfa-plc.py +geni-config-tty -> sfa-config-tty + +-------------------- new names for config files & miscell +/etc/geni -> /etc/sfa +/etc/geni/configSfi.sh -> /etc/sfa/sfa_config +/etc/init.d/geniwrapper -> /etc/init.d/sfa + +/etc/sfa/config_sfa, +/etc/sfa/config_sfi, +/etc/sfa/aggregates.xml, +/etc/sfa/registries.xml + are now preserved across rpm updates + +-------------------- deprecated +gacks/ +gui/ +dummy/ diff --git a/INSTALL.txt b/INSTALL.txt index dd26edaf..e5e0eeaa 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -25,7 +25,7 @@ write and quit --- run gimport -[2009.06.09--1l-f8-32-vplc07] / # gimport.py +[2009.06.09--1l-f8-32-vplc07] / # sfa-import-plc.py Import: creating top level authorities Hierarchy: creating authority: plc plc : @@ -60,16 +60,16 @@ Run: First run: # initialize the registry by running the registry import tool -python gimport.py +python sfa-import-plc.py # start the services service sfa start or -plc.py -r -d -plc.py -a -d -plc.py -s -d +sfa-plc.py -r -d +sfa-plc.py -a -d +sfa-plc.py -s -d Use: diff --git a/cmdline/genidump.py b/cmdline/genidump.py index c604c88d..99812cd9 100644 --- a/cmdline/genidump.py +++ b/cmdline/genidump.py @@ -5,14 +5,15 @@ import sys import os, os.path import tempfile import xmlrpclib +from types import StringTypes, ListType from optparse import OptionParser + from geni.util.certificate import Keypair, Certificate from geni.util.credential import Credential from geni.util.geniclient import GeniClient, ServerException from geni.util.gid import create_uuid from geni.util.record import GeniRecord from geni.util.rspec import Rspec -from types import StringTypes, ListType def determine_geni_filekind(fn): from geni.util.certificate import Certificate diff --git a/cmdline/getNodes.py b/cmdline/getNodes.py index df252a5e..6e321f84 100644 --- a/cmdline/getNodes.py +++ b/cmdline/getNodes.py @@ -5,6 +5,7 @@ import os from optparse import OptionParser from pprint import pprint from types import StringTypes + from geni.util.rspec import Rspec def create_parser(): diff --git a/cmdline/getRecord.py b/cmdline/getRecord.py index e0487423..fc6b3dbd 100755 --- a/cmdline/getRecord.py +++ b/cmdline/getRecord.py @@ -16,6 +16,7 @@ import os from optparse import OptionParser from pprint import pprint from xml.parsers.expat import ExpatError + from geni.util.rspec import RecordSpec diff --git a/cmdline/sfi.py b/cmdline/sfi.py index ab076395..cc37eb09 100755 --- a/cmdline/sfi.py +++ b/cmdline/sfi.py @@ -6,14 +6,15 @@ from __future__ import with_statement import sys import os, os.path import tempfile +from types import StringTypes, ListType from optparse import OptionParser + from geni.util.certificate import Keypair, Certificate from geni.util.credential import Credential from geni.util.geniclient import GeniClient, ServerException from geni.util.gid import create_uuid from geni.util.record import * from geni.util.rspec import Rspec -from types import StringTypes, ListType # xxx todo xxx auto-load ~/.sfi/sfi_config diff --git a/config/sfa-config-tty b/config/sfa-config-tty index 9cda7f5f..208eca57 100755 --- a/config/sfa-config-tty +++ b/config/sfa-config-tty @@ -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 this tool for the first time (before gimport.py) + # this is expected when running this tool for the first time (before sfa-import-plc.py) except: print "Could not create %(old_server_key)s - ignore if you haven't run gimport yet"%locals() diff --git a/geni/aggregate.py b/geni/aggregate.py index 8c05626b..f90332db 100644 --- a/geni/aggregate.py +++ b/geni/aggregate.py @@ -10,14 +10,14 @@ from types import StringTypes, ListType from geni.util.geniserver import GeniServer from geni.util.geniclient import GeniClient +from geni.util.storage import * +from geni.util.faults import * # GeniLight client support is optional try: from egeni.geniLight_client import * except ImportError: GeniClientLight = None -from geni.util.storage import * -from geni.util.faults import * class Aggregate(GeniServer): diff --git a/geni/init.d/sfa b/geni/init.d/sfa index 52ea5f8c..d4380932 100755 --- a/geni/init.d/sfa +++ b/geni/init.d/sfa @@ -21,17 +21,17 @@ start() { if [ "$GENI_REGISTRY_ENABLED" ]; then echo "Registry" - daemon /usr/bin/plc.py -r -d $OPTIONS + daemon /usr/bin/sfa-plc.py -r -d $OPTIONS fi if [ "$GENI_AGGREGATE_ENABLED" ]; then echo "Aggregate" - daemon /usr/bin/plc.py -a -d $OPTIONS + daemon /usr/bin/sfa-plc.py -a -d $OPTIONS fi if [ "$GENI_SM_ENABLED" ]; then echo "SliceMgr" - daemon /usr/bin/plc.py -s -d $OPTIONS + daemon /usr/bin/sfa-plc.py -s -d $OPTIONS fi RETVAL=$? @@ -42,7 +42,7 @@ start() { stop() { echo -n $"Shutting down GENIWrapper: " - killproc plc.py + killproc sfa-plc.py RETVAL=$? echo diff --git a/geni/methods/delete_slice.py b/geni/methods/delete_slice.py index f5b86cf8..b6be7974 100644 --- a/geni/methods/delete_slice.py +++ b/geni/methods/delete_slice.py @@ -6,8 +6,9 @@ from geni.util.misc import * from geni.util.method import Method from geni.util.parameter import Parameter, Mixed from geni.util.auth import Auth -from geni.aggregate import Aggregates + from geni.util.slices import Slices +from geni.aggregate import Aggregates class delete_slice(Method): """ diff --git a/geni/methods/list.py b/geni/methods/list.py index 50348509..86ec9282 100644 --- a/geni/methods/list.py +++ b/geni/methods/list.py @@ -6,6 +6,7 @@ from geni.util.method import Method from geni.util.parameter import Parameter, Mixed from geni.util.auth import Auth from geni.util.record import GeniRecord + from geni.registry import Registries class list(Method): diff --git a/geni/methods/resolve.py b/geni/methods/resolve.py index bb43f2be..09a068b1 100644 --- a/geni/methods/resolve.py +++ b/geni/methods/resolve.py @@ -6,9 +6,10 @@ from geni.util.method import Method from geni.util.parameter import Parameter, Mixed from geni.util.auth import Auth from geni.util.record import GeniRecord -from geni.registry import Registries from geni.util.debug import log +from geni.registry import Registries + class resolve(Method): """ Resolve a record. diff --git a/geni/registry.py b/geni/registry.py index 7b705c3e..7ab6346a 100644 --- a/geni/registry.py +++ b/geni/registry.py @@ -12,14 +12,15 @@ import sys from geni.util.geniserver import GeniServer from geni.util.geniclient import GeniClient +from geni.util.genitable import GeniTable +from geni.util.faults import * +from geni.util.storage import * + # GeniLight client support is optional try: from egeni.geniLight_client import * except ImportError: GeniClientLight = None -from geni.util.genitable import GeniTable -from geni.util.faults import * -from geni.util.storage import * ## # Registry is a GeniServer that serves registry and slice operations at PLC. diff --git a/geni/gimport.py b/geni/sfa-import-plc.py similarity index 100% rename from geni/gimport.py rename to geni/sfa-import-plc.py diff --git a/geni/plc.py b/geni/sfa-plc.py similarity index 96% rename from geni/plc.py rename to geni/sfa-plc.py index 46e87805..88293211 100644 --- a/geni/plc.py +++ b/geni/sfa-plc.py @@ -18,10 +18,10 @@ # is up to date and accurate. # # 1) Import the existing planetlab database, creating the -# appropriate geni records. This is done by running the "gimport.py" tool. +# appropriate geni records. This is done by running the "sfa-import-plc.py" tool. # # 2) Create a "trusted_roots" directory and place the certificate of the root -# authority in that directory. Given the defaults in gimport.py, this +# authority in that directory. Given the defaults in sfa-import-plc.py, this # certificate would be named "planetlab.gid". For example, # # mkdir trusted_roots; cp authorities/planetlab.gid trusted_roots/ diff --git a/geni/util/nodes.py b/geni/util/nodes.py index 765b7d1d..d77b3f3f 100644 --- a/geni/util/nodes.py +++ b/geni/util/nodes.py @@ -14,8 +14,8 @@ from geni.util.storage import * from geni.util.debug import log from geni.util.rspec import * from geni.util.specdict import * -from geni.aggregate import Aggregates from geni.util.policy import Policy +from geni.aggregate import Aggregates class Nodes(SimpleStorage): diff --git a/geniwrapper.spec b/geniwrapper.spec index 3319c02a..bb5e2eab 100644 --- a/geniwrapper.spec +++ b/geniwrapper.spec @@ -75,8 +75,8 @@ rm -rf $RPM_BUILD_ROOT %config (noreplace) /etc/sfa/registries.xml /etc/init.d/sfa %{_bindir}/sfa-config-tty -%{_bindir}/gimport.py* -%{_bindir}/plc.py* +%{_bindir}/sfa-import-plc.py* +%{_bindir}/sfa-plc.py* %files client %config (noreplace) /etc/sfa/sfi_config diff --git a/setup.py b/setup.py index fe9c75ff..b6bd2e00 100755 --- a/setup.py +++ b/setup.py @@ -8,8 +8,8 @@ import os, sys import shutil from distutils.core import setup, Extension -scripts = [ 'geni/gimport.py', - 'geni/plc.py', +scripts = [ 'geni/sfa-import-plc.py', + 'geni/sfa-plc.py', 'config/sfa-config-tty', 'cmdline/sfi.py', 'cmdline/getNodes.py', @@ -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/sfa/'] + site_packages_path - remove_files = ['/usr/bin/gimport.py', '/usr/bin/plc.py', '/usr/bin/sfi.py', '/usr/bin/sfa-config-tty'] + \ + remove_files = ['/usr/bin/sfa-import-plc.py', '/usr/bin/sfa-plc.py', '/usr/bin/sfi.py', '/usr/bin/sfa-config-tty'] + \ symlinks + initscripts # remove files -- 2.47.0