Changeset 6037


Ignore:
Timestamp:
23/11/09 11:11:43 (10 years ago)
Author:
aharwood
Message:

Port number can now be specified in exist configuration file

Location:
ndgCommon/trunk/ndg/common
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • ndgCommon/trunk/ndg/common/src/clients/xmldb/eXist/searchclient.py

    r5711 r6037  
    4545        ''' 
    4646        logging.debug("Initialising connection to eXist DB ('%s')" %dbName) 
    47         userID, password, host = loadConfigDetails(pwFilename, dbName) 
     47        userID, password, host, port = loadConfigDetails(pwFilename, dbName) 
    4848         
    4949        if clientType == dc.XML_RPC_CLIENT: 
    50             self.client = XMLRPCClient(dbName, userID, password) 
     50            self.client = XMLRPCClient(dbName, userID, password, port=port) 
    5151        else: 
    5252            raise ValueError("Unrecognised eXist client type: '%s'" %clientType) 
  • ndgCommon/trunk/ndg/common/src/lib/utilities.py

    r5296 r6037  
    8989        if not line: 
    9090            continue 
    91         host,userid,password=line.split(' ') 
    92         data = (userid, password, host) 
     91        host,userid,password,port=line.split(' ') 
     92        port = int(port) 
     93        data = (userid, password, host, port) 
    9394        if not dbName or dbName == host: 
    9495            f.close() 
     
    9798 
    9899    raise ValueError('Unable to find valid eXist config data') 
    99  
    100100 
    101101def getDefaultProxy(url): 
  • ndgCommon/trunk/ndg/common/unittests/clients/xmldb/eXist/testrestclient.py

    r6036 r6037  
    1616        set up data used in the tests. 
    1717        ''' 
    18         userid, password, host = loadConfigDetails(tc.EXIST_DBCONFIG_FILE, tc.EXIST_DB) 
    19         self.client = RESTClient(host, userid, password) 
     18        userid, password, host, port = loadConfigDetails(tc.EXIST_DBCONFIG_FILE, tc.EXIST_DB) 
     19        self.client = RESTClient(host, userid, password, port=port) 
    2020 
    2121        self.createdAtoms = []    # array to store paths to atoms created - in order to then delete them 
  • ndgCommon/trunk/ndg/common/unittests/clients/xmldb/eXist/testxmlrpcclient.py

    r5219 r6037  
    1616        set up data used in the tests. 
    1717        ''' 
    18         userid, password, host = loadConfigDetails(tc.EXIST_DBCONFIG_FILE, tc.EXIST_DB) 
    19         self.client = XMLRPCClient(host, userid, password) 
     18        userid, password, host, port = loadConfigDetails(tc.EXIST_DBCONFIG_FILE, tc.EXIST_DB) 
     19        self.client = XMLRPCClient(host, userid, password, port=port) 
    2020 
    2121        self.createdAtoms = []    # array to store paths to atoms created - in order to then delete them 
  • ndgCommon/trunk/ndg/common/unittests/lib/testutilities.py

    r5219 r6037  
    2727         
    2828    def testLoadConfigDetailsValidAllOutput(self): 
    29         id, pw, host = utilities.loadConfigDetails(tc.EXIST_DBCONFIG_FILE, dbName = tc.EXIST_DB) 
     29        id, pw, host, port = utilities.loadConfigDetails(tc.EXIST_DBCONFIG_FILE, dbName = tc.EXIST_DB) 
    3030        self.assertTrue(id) 
    3131        self.assertTrue(pw) 
Note: See TracChangeset for help on using the changeset viewer.