Changeset 4566


Ignore:
Timestamp:
09/12/08 08:56:15 (11 years ago)
Author:
pjkersha
Message:

Add deprecation warning for SQLObject CredentialRepository? implementation. Replace with SQLAlchemy based implementation in a future release

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg.security.common/ndg/security/common/SQLObject.py

    r4404 r4566  
    1212__contact__ = "Philip.Kershaw@stfc.ac.uk" 
    1313__revision__ = '$Id$' 
     14warnings.warn("sqlobject based implementation to be replaced with SQLAlchemy " 
     15              "equivalent in a future release",  
     16              DeprecationWarning, stacklevel=2) 
    1417 
    1518# SQLObject Database interface 
     
    2932 
    3033 
    31 #_____________________________________________________________________________ 
    3234class CredentialRepository(CredentialRepositoryBase): 
    3335    """Interface to Credential Repository Database 
    3436     
    35     Nb. inherits from CredentialWallet.CredentialRepository to ensure correct interface 
    36     to the wallet""" 
     37    Nb. inherits from CredentialWallet.CredentialRepository to ensure correct  
     38    interface to the wallet""" 
    3739 
    3840    # valid configuration property keywords 
     
    4042     
    4143     
    42     #_________________________________________________________________________     
    4344    def __init__(self, propFilePath=None, dbPPhrase=None, **prop): 
    4445        """Initialise Credentials Repository Database object. 
     
    5253        Nb. propFilePath setting overrides input dbURI 
    5354        """ 
     55        warnings.warn("sqlobject based implementation to be replaced with " 
     56                      "SQLAlchemy equivalent in a future release",  
     57                      DeprecationWarning, stacklevel=2) 
    5458             
    5559        self.__con = None 
     
    6670            self.setProperties(dbPPhrase=dbPPhrase, **prop) 
    6771 
    68  
    69     #_________________________________________________________________________     
    7072    def __setConnection(self, 
    7173                        dbType=None, 
     
    139141           
    140142 
    141     #_________________________________________________________________________     
    142143    def setProperties(self, dbPPhrase=None, **prop): 
    143144        """Update existing properties from an input dictionary 
     
    156157 
    157158 
    158     #_________________________________________________________________________     
    159159    def readProperties(self, 
    160160                       propFilePath=None, 
     
    204204 
    205205             
    206     #_________________________________________________________________________     
    207206    def addUser(self, userName, dn): 
    208207        """A new user to Credentials Repository""" 
     
    214213                                                                (userName, e) 
    215214 
    216  
    217     #_________________________________________________________________________     
    218215    def auditCredentials(self, dn=None, **attCertValidKeys): 
    219216        """Check the attribute certificates held in the repository and delete 
     
    263260 
    264261 
    265     #_________________________________________________________________________     
    266262    def getCredentials(self, dn): 
    267263        """Get the list of credentials for a given user's DN""" 
     
    274270 
    275271 
    276     #_________________________________________________________________________     
    277272    def addCredentials(self, dn, attCertList): 
    278273        """Add new attribute certificates for a user.  The user must have 
Note: See TracChangeset for help on using the changeset viewer.