From ad8c1f166a4ce5617d330a903e12852dd6f472fe Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Thu, 2 Jul 2009 08:40:01 +0000 Subject: [PATCH] review on imports & svn keywords --- geni/aggregate.py | 9 +- geni/alt_aggregate.py | 5 +- geni/gimport.py | 2 + geni/methods/create_gid.py | 4 +- geni/methods/create_slice.py | 4 +- geni/methods/delete_slice.py | 4 +- geni/methods/get_credential.py | 4 +- geni/methods/get_resources.py | 4 +- geni/methods/get_slices.py | 4 +- geni/methods/get_ticket.py | 4 +- geni/methods/list.py | 4 +- geni/methods/register.py | 4 +- geni/methods/remove.py | 4 +- geni/methods/reset_slice.py | 4 +- geni/methods/resolve.py | 5 +- geni/methods/start_slice.py | 4 +- geni/methods/stop_slice.py | 4 +- geni/methods/update.py | 4 +- geni/nuke.py | 3 + geni/plc.py | 5 +- geni/registry.py | 12 +- geni/slicemgr.py | 5 +- geni/util/api.py | 2 + geni/util/auth.py | 4 +- geni/util/cert.py | 6 +- geni/util/config.py | 25 ++-- geni/util/credential.py | 14 +- geni/util/debug.py | 3 + geni/util/excep.py | 233 --------------------------------- geni/util/geniclient.py | 3 + geni/util/geniserver.py | 8 +- geni/util/genitable.py | 3 + geni/util/geniticket.py | 3 + geni/util/gid.py | 3 + geni/util/hierarchy.py | 16 ++- geni/util/method.py | 5 +- geni/util/misc.py | 5 +- geni/util/nodes.py | 5 +- geni/util/parameter.py | 5 +- geni/util/policy.py | 3 + geni/util/record.py | 9 +- geni/util/remoteshell.py | 3 + geni/util/rspec.py | 3 + geni/util/slices.py | 6 +- geni/util/specdict.py | 4 +- geni/util/storage.py | 4 + geni/util/trustedroot.py | 5 +- geni/util/util.py | 6 +- 48 files changed, 189 insertions(+), 299 deletions(-) delete mode 100644 geni/util/excep.py diff --git a/geni/aggregate.py b/geni/aggregate.py index 3fb3566b..4f95ee83 100644 --- a/geni/aggregate.py +++ b/geni/aggregate.py @@ -1,19 +1,24 @@ +### $Id$ +### $URL$ + import os import sys import datetime import time import xmlrpclib - from types import StringTypes, ListType + from geni.util.geniserver import GeniServer from geni.util.geniclient import GeniClient + # GeniLight client support is optional try: from egeni.geniLight_client import * except ImportError: GeniClientLight = None from geni.util.storage import * -from geni.util.excep import * +from geni.util.faults import * + class Aggregate(GeniServer): diff --git a/geni/alt_aggregate.py b/geni/alt_aggregate.py index 304fc95f..2a866f39 100644 --- a/geni/alt_aggregate.py +++ b/geni/alt_aggregate.py @@ -1,3 +1,6 @@ +### $Id$ +### $URL$ + import os import sys import datetime @@ -9,7 +12,7 @@ from geni.util.geniclient import * from geni.util.cert import Keypair, Certificate from geni.util.credential import Credential from geni.util.trustedroot import TrustedRootList -from geni.util.excep import * +from geni.util.faults import * from geni.util.misc import * from geni.util.config import Config from geni.util.rspec import Rspec diff --git a/geni/gimport.py b/geni/gimport.py index 3c7db5e1..12de56a8 100755 --- a/geni/gimport.py +++ b/geni/gimport.py @@ -1,5 +1,7 @@ #!/usr/bin/python # +### $Id$ +### $URL$ # ## # Import PLC records into the Geni database. It is indended that this tool be diff --git a/geni/methods/create_gid.py b/geni/methods/create_gid.py index a99936c3..08663c58 100644 --- a/geni/methods/create_gid.py +++ b/geni/methods/create_gid.py @@ -1,5 +1,7 @@ +### $Id$ +### $URL$ + from geni.util.faults import * -from geni.util.excep import * from geni.util.method import Method from geni.util.parameter import Parameter, Mixed from geni.util.auth import Auth diff --git a/geni/methods/create_slice.py b/geni/methods/create_slice.py index d4e9af92..8b8cffee 100644 --- a/geni/methods/create_slice.py +++ b/geni/methods/create_slice.py @@ -1,5 +1,7 @@ +### $Id$ +### $URL$ + from geni.util.faults import * -from geni.util.excep import * from geni.util.misc import * from geni.util.method import Method from geni.util.parameter import Parameter, Mixed diff --git a/geni/methods/delete_slice.py b/geni/methods/delete_slice.py index 7aecc1e5..f5b86cf8 100644 --- a/geni/methods/delete_slice.py +++ b/geni/methods/delete_slice.py @@ -1,5 +1,7 @@ +### $Id$ +### $URL$ + from geni.util.faults import * -from geni.util.excep import * from geni.util.misc import * from geni.util.method import Method from geni.util.parameter import Parameter, Mixed diff --git a/geni/methods/get_credential.py b/geni/methods/get_credential.py index 4ee2e2da..42e6b640 100644 --- a/geni/methods/get_credential.py +++ b/geni/methods/get_credential.py @@ -1,5 +1,7 @@ +### $Id$ +### $URL$ + from geni.util.faults import * -from geni.util.excep import * from geni.util.method import Method from geni.util.parameter import Parameter, Mixed from geni.util.auth import Auth diff --git a/geni/methods/get_resources.py b/geni/methods/get_resources.py index 12484316..53873a7f 100644 --- a/geni/methods/get_resources.py +++ b/geni/methods/get_resources.py @@ -1,5 +1,7 @@ +### $Id$ +### $URL$ + from geni.util.faults import * -from geni.util.excep import * from geni.util.method import Method from geni.util.parameter import Parameter, Mixed from geni.util.auth import Auth diff --git a/geni/methods/get_slices.py b/geni/methods/get_slices.py index 40f68f66..1777c01b 100644 --- a/geni/methods/get_slices.py +++ b/geni/methods/get_slices.py @@ -1,5 +1,7 @@ +### $Id$ +### $URL$ + from geni.util.faults import * -from geni.util.excep import * from geni.util.misc import * from geni.util.method import Method from geni.util.parameter import Parameter, Mixed diff --git a/geni/methods/get_ticket.py b/geni/methods/get_ticket.py index e2b0e368..667b20a6 100644 --- a/geni/methods/get_ticket.py +++ b/geni/methods/get_ticket.py @@ -1,5 +1,7 @@ +### $Id$ +### $URL$ + from geni.util.faults import * -from geni.util.excep import * from geni.util.method import Method from geni.util.parameter import Parameter, Mixed from geni.util.auth import Auth diff --git a/geni/methods/list.py b/geni/methods/list.py index bfa9e446..50348509 100644 --- a/geni/methods/list.py +++ b/geni/methods/list.py @@ -1,5 +1,7 @@ +### $Id$ +### $URL$ + from geni.util.faults import * -from geni.util.excep import * from geni.util.method import Method from geni.util.parameter import Parameter, Mixed from geni.util.auth import Auth diff --git a/geni/methods/register.py b/geni/methods/register.py index 1c095ad1..12c4939e 100644 --- a/geni/methods/register.py +++ b/geni/methods/register.py @@ -1,5 +1,7 @@ +### $Id$ +### $URL$ + from geni.util.faults import * -from geni.util.excep import * from geni.util.method import Method from geni.util.parameter import Parameter, Mixed from geni.util.auth import Auth diff --git a/geni/methods/remove.py b/geni/methods/remove.py index e16cdbe0..c824da91 100644 --- a/geni/methods/remove.py +++ b/geni/methods/remove.py @@ -1,5 +1,7 @@ +### $Id$ +### $URL$ + from geni.util.faults import * -from geni.util.excep import * from geni.util.method import Method from geni.util.parameter import Parameter, Mixed from geni.util.auth import Auth diff --git a/geni/methods/reset_slice.py b/geni/methods/reset_slice.py index 4b84942d..813eb5ca 100644 --- a/geni/methods/reset_slice.py +++ b/geni/methods/reset_slice.py @@ -1,5 +1,7 @@ +### $Id$ +### $URL$ + from geni.util.faults import * -from geni.util.excep import * from geni.util.misc import * from geni.util.method import Method from geni.util.parameter import Parameter, Mixed diff --git a/geni/methods/resolve.py b/geni/methods/resolve.py index dca385b7..bb43f2be 100644 --- a/geni/methods/resolve.py +++ b/geni/methods/resolve.py @@ -1,8 +1,7 @@ - - +### $Id$ +### $URL$ from geni.util.faults import * -from geni.util.excep import * from geni.util.method import Method from geni.util.parameter import Parameter, Mixed from geni.util.auth import Auth diff --git a/geni/methods/start_slice.py b/geni/methods/start_slice.py index 5eec8f7e..cb9be967 100644 --- a/geni/methods/start_slice.py +++ b/geni/methods/start_slice.py @@ -1,5 +1,7 @@ +### $Id$ +### $URL$ + from geni.util.faults import * -from geni.util.excep import * from geni.util.misc import * from geni.util.method import Method from geni.util.parameter import Parameter, Mixed diff --git a/geni/methods/stop_slice.py b/geni/methods/stop_slice.py index fbb4c3f8..ffe1dea6 100644 --- a/geni/methods/stop_slice.py +++ b/geni/methods/stop_slice.py @@ -1,5 +1,7 @@ +### $Id$ +### $URL$ + from geni.util.faults import * -from geni.util.excep import * from geni.util.misc import * from geni.util.method import Method from geni.util.parameter import Parameter, Mixed diff --git a/geni/methods/update.py b/geni/methods/update.py index e9866e38..75cb1006 100644 --- a/geni/methods/update.py +++ b/geni/methods/update.py @@ -1,5 +1,7 @@ +### $Id$ +### $URL$ + from geni.util.faults import * -from geni.util.excep import * from geni.util.method import Method from geni.util.parameter import Parameter, Mixed from geni.util.auth import Auth diff --git a/geni/nuke.py b/geni/nuke.py index 667ca8f2..04a93ced 100644 --- a/geni/nuke.py +++ b/geni/nuke.py @@ -1,3 +1,6 @@ +### $Id$ +### $URL$ + ## # Delete all the database records for Geni. This tool is used to clean out Geni # records during testing. diff --git a/geni/plc.py b/geni/plc.py index 5b6bedf0..5f00b978 100644 --- a/geni/plc.py +++ b/geni/plc.py @@ -1,5 +1,8 @@ #!/usr/bin/python -## +# +### $Id$ +### $URL$ +# # GENI PLC Wrapper # # This wrapper implements the Geni Registry and Slice Interfaces on PLC. diff --git a/geni/registry.py b/geni/registry.py index 7844cfec..e3286502 100644 --- a/geni/registry.py +++ b/geni/registry.py @@ -1,5 +1,9 @@ -## +# # Registry is a GeniServer that implements the Registry interface +# +### $Id$ +### $URL$ +# import tempfile import os @@ -14,13 +18,9 @@ try: except ImportError: GeniClientLight = None from geni.util.genitable import GeniTable -from geni.util.excep import * +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/slicemgr.py b/geni/slicemgr.py index 5ecf8e09..9ecd59ec 100644 --- a/geni/slicemgr.py +++ b/geni/slicemgr.py @@ -1,3 +1,6 @@ +### $Id$ +### $URL$ + import os import sys import datetime @@ -5,7 +8,7 @@ import time from geni.util.geniserver import * from geni.util.geniclient import * -from geni.util.excep import * +from geni.util.faults import * from geni.util.misc import * class SliceMgr(GeniServer): diff --git a/geni/util/api.py b/geni/util/api.py index d1c8f608..fc0615de 100644 --- a/geni/util/api.py +++ b/geni/util/api.py @@ -1,6 +1,8 @@ # # Geniwrapper XML-RPC and SOAP interfaces # +### $Id$ +### $URL$ # import sys diff --git a/geni/util/auth.py b/geni/util/auth.py index 723a8b11..8edef7e4 100644 --- a/geni/util/auth.py +++ b/geni/util/auth.py @@ -1,11 +1,13 @@ # # GeniAPI authentication # +### $Id$ +### $URL$ # import time + from geni.util.faults import * -from geni.util.excep import * from geni.util.credential import Credential from geni.util.trustedroot import TrustedRootList from geni.util.hierarchy import Hierarchy diff --git a/geni/util/cert.py b/geni/util/cert.py index 986a09bd..06e4c2a4 100644 --- a/geni/util/cert.py +++ b/geni/util/cert.py @@ -10,6 +10,10 @@ # # This module exports two classes: Keypair and Certificate. ## +# +### $Id$ +### $URL$ +# import os import tempfile @@ -19,7 +23,7 @@ import M2Crypto from M2Crypto import X509 from M2Crypto import EVP -from excep import * +from faults import * def convert_public_key(key): # find the keyconvert program diff --git a/geni/util/config.py b/geni/util/config.py index f9095944..68c38f01 100644 --- a/geni/util/config.py +++ b/geni/util/config.py @@ -14,16 +14,20 @@ # Note that Geniwrapper does not access any of the PLC databases directly via # a mysql connection; All PLC databases are accessed via PLCAPI. -from os.path import join,dirname,basename,abspath -from geni.util.debug import log +### $Id$ +### $URL$ + +import os.path import traceback +from geni.util.debug import log + # xxx the path-search part could use a cleanup; # why would anyone want to store the config in /usr/share/geniwrapper at all ? # also, if users want to use this, it might help to store stuff in ~/.sfirc or something # this would denote "/usr/share/geniwrapper/geni" -# geni = join(dirname(dirname(dirname(abspath(__file__)))), "geni") +# geni = join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))), "geni") class Config: """ @@ -36,17 +40,12 @@ class Config: loaded = False # path to config.py source - this would be '/usr/share/geniwrapper/geni/util' - path = dirname(abspath(__file__)) - # self.path not used from the outside - #self.path = path + path = os.path.dirname(os.path.abspath(__file__)) # parent directory of config.py source - self.basepath = dirname(path) + self.basepath = os.path.dirname(path) # path to actual config file - filename = basename(filepath) - # my guess is that alt_file and geni_file are identical - alt_file = join(path, 'util', filename) - # geni_file = join(geni, 'util', filename) - #files = [filepath, alt_file, geni_file] + filename = os.path.basename(filepath) + alt_file = os.path.join(path, 'util', filename) files = [filepath, alt_file] for config_file in files: @@ -54,7 +53,7 @@ class Config: execfile(config_file, self.__dict__) loaded = True self.config_file = config_file - self.config_path = dirname(config_file) + self.config_path = os.path.dirname(config_file) break except: pass diff --git a/geni/util/credential.py b/geni/util/credential.py index 1d469ac7..0fb8240a 100644 --- a/geni/util/credential.py +++ b/geni/util/credential.py @@ -5,11 +5,15 @@ # certificate that stores a tuple of parameters. ## -from cert import * -from rights import * -from gid import * +### $Id$ +### $URL$ + import xmlrpclib +from geni.util.cert import * +from geni.util.rights import * +from geni.util.gid import * + ## # Credential is a tuple: # (GIDCaller, GIDObject, LifeTime, Privileges, Delegate) @@ -204,7 +208,9 @@ class Credential(Certificate): # make sure the rights given to the child are a subset of the # parents rights if not self.parent.get_privileges().is_superset(self.get_privileges()): - raise ChildRightsNotSubsetOfParent(self.get_subject() + " " + self.parent.get_privileges().save_to_string() + " " + self.get_privileges().save_to_string()) + raise ChildRightsNotSubsetOfParent(self.get_subject() + + " " + self.parent.get_privileges().save_to_string() + + " " + self.get_privileges().save_to_string()) return diff --git a/geni/util/debug.py b/geni/util/debug.py index b8dac85e..e5f6f3fb 100644 --- a/geni/util/debug.py +++ b/geni/util/debug.py @@ -1,3 +1,6 @@ +### $Id$ +### $URL$ + import time import sys import syslog diff --git a/geni/util/excep.py b/geni/util/excep.py deleted file mode 100644 index 6d11de3b..00000000 --- a/geni/util/excep.py +++ /dev/null @@ -1,233 +0,0 @@ -# -# GeniAPI XML-RPC faults -# -# - -import xmlrpclib - -class GeniFault(xmlrpclib.Fault): - def __init__(self, faultCode, faultString, extra = None): - if extra: - faultString += ": " + extra - xmlrpclib.Fault.__init__(self, faultCode, faultString) - -class GeniInvalidAPIMethod(GeniFault): - def __init__(self, method, interface = None, extra = None): - faultString = "Invalid method " + method - if interface: - faultString += " for interface " + interface - GeniFault.__init__(self, 100, faultString, extra) - -class GeniInvalidArgumentCount(GeniFault): - def __init__(self, got, min, max = min, extra = None): - if min != max: - expected = "%d-%d" % (min, max) - else: - expected = "%d" % min - faultString = "Expected %s arguments, got %d" % \ - (expected, got) - GeniFault.__init__(self, 101, faultString, extra) - -class GeniInvalidArgument(GeniFault): - def __init__(self, extra = None, name = None): - if name is not None: - faultString = "Invalid %s value" % name - else: - faultString = "Invalid argument" - GeniFault.__init__(self, 102, faultString, extra) - -class GeniAuthenticationFailure(GeniFault): - def __init__(self, extra = None): - faultString = "Failed to authenticate call" - GeniFault.__init__(self, 103, faultString, extra) - -class GeniDBError(GeniFault): - def __init__(self, extra = None): - faultString = "Database error" - GeniFault.__init__(self, 106, faultString, extra) - -class GeniPermissionDenied(GeniFault): - def __init__(self, extra = None): - faultString = "Permission denied" - GeniFault.__init__(self, 108, faultString, extra) - -class GeniNotImplemented(GeniFault): - def __init__(self, extra = None): - faultString = "Not fully implemented" - GeniFault.__init__(self, 109, faultString, extra) - -class GeniAPIError(GeniFault): - def __init__(self, extra = None): - faultString = "Internal API error" - GeniFault.__init__(self, 111, faultString, extra) - -class MalformedHrnException(GeniFault): - def __init__(self, value, extra = None): - self.value = value - faultString = "Malformed HRN: %(value)s" % locals() - GeniFault.__init__(self, 102, faultString, extra) - def __str__(self): - return repr(self.value) - -class TreeException(GeniFault): - def __init__(self, value, extra = None): - self.value = value - faultString = "Tree Exception: %(value)s, " % locals() - GeniFault.__init__(self, 111, faultString, extra) - def __str__(self): - return repr(self.value) - -class NonexistingRecord(GeniFault): - def __init__(self, value, extra = None): - self.value = value - faultString = "Non exsiting record %(value)s, " % locals() - GeniFault.__init__(self, 111, faultString, extra) - def __str__(self): - return repr(self.value) - -class ExistingRecord(GeniFault): - def __init__(self, value, extra = None): - self.value = value - faultString = "Existing record: %(value)s, " % locals() - GeniFault.__init__(self, 111, faultString, extra) - def __str__(self): - return repr(self.value) - -class NonexistingCredType(GeniFault): - def __init__(self, value, extra = None): - self.value = value - faultString = "Non existing record: %(value)s, " % locals() - GeniFault.__init__(self, 111, faultString, extra) - def __str__(self): - return repr(self.value) - -class NonexistingFile(GeniFault): - def __init__(self, value): - self.value = value - faultString = "Non existing file: %(value)s, " % locals() - GeniFault.__init__(self, 111, faultString, extra) - def __str__(self): - return repr(self.value) - -class InvalidRPCParams(GeniFault): - def __init__(self, value): - self.value = value - faultString = "Invalid RPC Params: %(value)s, " % locals() - GeniFault.__init__(self, 102, faultString, extra) - def __str__(self): - return repr(self.value) - -# SMBAKER exceptions follow - -class ConnectionKeyGIDMismatch(GeniFault): - def __init__(self, value, extra = None): - self.value = value - faultString = "Connection Key GID mismatch: %(value)s" % locals() - GeniFault.__init__(self, 102, faultString, extra) - def __str__(self): - return repr(self.value) - -class MissingCallerGID(GeniFault): - def __init__(self, value, extra = None): - self.value = value - faultString = "Missing Caller GID: %(value)s" % locals() - GeniFault.__init__(self, 102, faultString, extra) - def __str__(self): - return repr(self.value) - -class RecordNotFound(GeniFault): - def __init__(self, value, extra = None): - self.value = value - faultString = "Record not found: %(value)s" % locals() - GeniFault.__init__(self, 102, faultString, extra) - #def __str__(self): - # return repr(self.value) - -class UnknownGeniType(GeniFault): - def __init__(self, value, extra = None): - self.value = value - faultString = "Unknown Geni Type: %(value)s" % locals() - GeniFault.__init__(self, 102, faultString, extra) - def __str__(self): - return repr(self.value) - -class MissingAuthority(GeniFault): - def __init__(self, value, extra = None): - self.value = value - faultString = "Missing authority: %(value)s" % locals() - GeniFault.__init__(self, 102, faultString, extra) - def __str__(self): - return repr(self.value) - -class PlanetLabRecordDoesNotExist(GeniFault): - def __init__(self, value, extra = None): - self.value = value - faultString = "PlanetLab record does not exist : %(value)s" % locals() - GeniFault.__init__(self, 102, faultString, extra) - def __str__(self): - return repr(self.value) - -class PermissionError(GeniFault): - def __init__(self, value, extra = None): - self.value = value - faultString = "Permission error: %(value)s" % locals() - GeniFault.__init__(self, 108, faultString, extra) - def __str__(self): - return repr(self.value) - -class InsufficientRights(GeniFault): - def __init__(self, value, extra = None): - self.value = value - faultString = "Insufficient rights: %(value)s" % locals() - GeniFault.__init__(self, 108, faultString, extra) - def __str__(self): - return repr(self.value) - -class MissingDelegateBit(GeniFault): - def __init__(self, value, extra = None): - self.value = value - faultString = "Missing delegate bit: %(value)s" % locals() - GeniFault.__init__(self, 108, faultString, extra) - def __str__(self): - return repr(self.value) - -class ChildRightsNotSubsetOfParent(GeniFault): - def __init__(self, value, extra = None): - self.value = value - faultString = "Child rights not subset of parent: %(value)s" % locals() - GeniFault.__init__(self, 103, faultString, extra) - def __str__(self): - return repr(self.value) - -class CertMissingParent(GeniFault): - def __init__(self, value, extra = None): - self.value = value - faultString = "Cert missing parent: %(value)s" % locals() - GeniFault.__init__(self, 103, faultString, extra) - def __str__(self): - return repr(self.value) - -class CertNotSignedByParent(GeniFault): - def __init__(self, value, extra = None): - self.value = value - faultString = "Cert not signed by parent: %(value)s" % locals() - GeniFault.__init__(self, 103, faultString, extra) - def __str__(self): - return repr(self.value) - -class GidInvalidParentHrn(GeniFault): - def __init__(self, value, extra = None): - self.value = value - faultString = "GID invalid parent hrn: %(value)s" % locals() - GeniFault.__init__(self, 102, faultString, extra) - def __str__(self): - return repr(self.value) - -class SliverDoesNotExist(GeniFault): - def __init__(self, value, extra = None): - self.value = value - faultString = "Sliver does not exist : %(value)s" % locals() - GeniFault.__init__(self, 102, faultString, extra) - def __str__(self): - return repr(self.value) - diff --git a/geni/util/geniclient.py b/geni/util/geniclient.py index 0022eab2..fec2d50b 100644 --- a/geni/util/geniclient.py +++ b/geni/util/geniclient.py @@ -6,6 +6,9 @@ # TODO: Investigate ways to combine this with existing PLC API? ## +### $Id$ +### $URL$ + import xmlrpclib from gid import * diff --git a/geni/util/geniserver.py b/geni/util/geniserver.py index b8492862..9e01774d 100644 --- a/geni/util/geniserver.py +++ b/geni/util/geniserver.py @@ -6,21 +6,23 @@ # TODO: investigate ways to combine this with existing PLC server? ## -import SimpleXMLRPCServer +### $Id$ +### $URL$ import sys import traceback import threading +import socket, os + import SocketServer import BaseHTTPServer import SimpleHTTPServer import SimpleXMLRPCServer -import socket, os + from OpenSSL import SSL from geni.util.cert import * from geni.util.credential import * -from geni.util.excep import * from geni.util.faults import * from geni.util.api import GeniAPI from geni.util.debug import log diff --git a/geni/util/genitable.py b/geni/util/genitable.py index e6dd0159..13ce7d94 100644 --- a/geni/util/genitable.py +++ b/geni/util/genitable.py @@ -4,6 +4,9 @@ # # TODO: Use existing PLC database methods? or keep this separate? +### $Id$ +### $URL$ + import report from pg import DB, ProgrammingError diff --git a/geni/util/geniticket.py b/geni/util/geniticket.py index 1869e581..1ca0ab23 100644 --- a/geni/util/geniticket.py +++ b/geni/util/geniticket.py @@ -3,6 +3,9 @@ # implements GENI tickets # +### $Id$ +### $URL$ + from cert import * from rights import * from gid import * diff --git a/geni/util/gid.py b/geni/util/gid.py index c9196056..cd7ba014 100644 --- a/geni/util/gid.py +++ b/geni/util/gid.py @@ -3,6 +3,9 @@ # descendant of the certificate class. ## +### $Id$ +### $URL$ + from cert import * import uuid import xmlrpclib diff --git a/geni/util/hierarchy.py b/geni/util/hierarchy.py index e86d0f38..dd2bd505 100644 --- a/geni/util/hierarchy.py +++ b/geni/util/hierarchy.py @@ -12,14 +12,18 @@ # *.DBINFO - database info ## +### $Id$ +### $URL$ + import os import report -from cert import * -from credential import * -from gid import * -from misc import * -from config import * -from geniticket import * + +from geni.util.cert import * +from geni.util.credential import * +from geni.util.gid import * +from geni.util.misc import * +from geni.util.config import * +from geni.util.geniticket import * ## # The AuthInfo class contains the information for an authority. This information diff --git a/geni/util/method.py b/geni/util/method.py index 3d9d3a19..c7363860 100644 --- a/geni/util/method.py +++ b/geni/util/method.py @@ -3,6 +3,9 @@ # # +### $Id$ +### $URL$ + import xmlrpclib from types import * import textwrap @@ -12,7 +15,7 @@ import pprint from types import StringTypes -from geni.util.excep import * +from geni.util.faults import * from geni.util.parameter import Parameter, Mixed, python_type, xmlrpc_type from geni.util.auth import Auth from geni.util.debug import profile, log diff --git a/geni/util/misc.py b/geni/util/misc.py index 5913419a..1e6f6bbf 100644 --- a/geni/util/misc.py +++ b/geni/util/misc.py @@ -1,4 +1,7 @@ -from excep import * +### $Id$ +### $URL$ + +from faults import * def get_leaf(hrn): parts = hrn.split(".") diff --git a/geni/util/nodes.py b/geni/util/nodes.py index 8b2b2562..765b7d1d 100644 --- a/geni/util/nodes.py +++ b/geni/util/nodes.py @@ -1,3 +1,6 @@ +### $Id$ +### $URL$ + import os import time import datetime @@ -6,7 +9,7 @@ import sys from geni.util.misc import * from geni.util.rspec import * from geni.util.specdict import * -from geni.util.excep import * +from geni.util.faults import * from geni.util.storage import * from geni.util.debug import log from geni.util.rspec import * diff --git a/geni/util/parameter.py b/geni/util/parameter.py index 2a52ce48..37b25fca 100644 --- a/geni/util/parameter.py +++ b/geni/util/parameter.py @@ -4,9 +4,12 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: Parameter.py 5574 2007-10-25 20:33:17Z thierry $ +# $Id$ # +### $Id$ +### $URL$ + from types import * from geni.util.faults import * diff --git a/geni/util/policy.py b/geni/util/policy.py index 3f5c837c..62ce145e 100644 --- a/geni/util/policy.py +++ b/geni/util/policy.py @@ -1,3 +1,6 @@ +### $Id$ +### $URL$ + import os from geni.util.storage import * diff --git a/geni/util/record.py b/geni/util/record.py index 55b9f2cc..a91e6bec 100644 --- a/geni/util/record.py +++ b/geni/util/record.py @@ -4,9 +4,14 @@ # TODO: Use existing PLC database methods? or keep this separate? ## -import report +### $Id$ +### $URL$ + from types import StringTypes -from gid import * + +import geni.util.report + +from geni.util.gid import * from geni.util.rspec import * from geni.util.parameter import * diff --git a/geni/util/remoteshell.py b/geni/util/remoteshell.py index db150834..6d5453d7 100644 --- a/geni/util/remoteshell.py +++ b/geni/util/remoteshell.py @@ -6,6 +6,9 @@ # PLC.Shell.Shell(). It's meant to be a drop in replacement for running # geniwrapper on a different machine than PLC. +### $Id$ +### $URL$ + import xmlrpclib class RemoteShell: diff --git a/geni/util/rspec.py b/geni/util/rspec.py index b4c339b9..a184dc02 100644 --- a/geni/util/rspec.py +++ b/geni/util/rspec.py @@ -1,3 +1,6 @@ +### $Id$ +### $URL$ + import sys import pprint import os diff --git a/geni/util/slices.py b/geni/util/slices.py index 596e0bb6..1c9669b9 100644 --- a/geni/util/slices.py +++ b/geni/util/slices.py @@ -1,9 +1,13 @@ +### $Id$ +### $URL$ + import datetime import time + from geni.util.misc import * from geni.util.rspec import * from geni.util.specdict import * -from geni.util.excep import * +from geni.util.faults import * from geni.util.storage import * from geni.util.policy import Policy from geni.util.debug import log diff --git a/geni/util/specdict.py b/geni/util/specdict.py index 64844968..59608870 100644 --- a/geni/util/specdict.py +++ b/geni/util/specdict.py @@ -10,8 +10,10 @@ # SpecDict.plc_fields defines a one to one mapping of plc attribute to rspec # attribute -from types import StringTypes, ListType +### $Id$ +### $URL$ +from types import StringTypes, ListType class SpecDict(dict): """ diff --git a/geni/util/storage.py b/geni/util/storage.py index bd523510..9eef1e99 100644 --- a/geni/util/storage.py +++ b/geni/util/storage.py @@ -1,4 +1,8 @@ +### $Id$ +### $URL$ + import os + from geni.util.rspec import RecordSpec class SimpleStorage(dict): diff --git a/geni/util/trustedroot.py b/geni/util/trustedroot.py index 7f9f7388..b41753da 100644 --- a/geni/util/trustedroot.py +++ b/geni/util/trustedroot.py @@ -1,6 +1,9 @@ +### $Id$ +### $URL$ + import os -from gid import * +from geni.util.gid import * from geni.util.config import Config class TrustedRootList(): diff --git a/geni/util/util.py b/geni/util/util.py index f18fdac4..f6f1f229 100644 --- a/geni/util/util.py +++ b/geni/util/util.py @@ -1,4 +1,8 @@ -from excep import * +### $Id$ +### $URL$ + +from faults import * + SR_SUFFIX = '_srr' CR_SUFFIX = '_crr' -- 2.47.0