Changeset 4259


Ignore:
Timestamp:
01/10/08 14:00:41 (11 years ago)
Author:
cbyrom
Message:

Add ability to set the discovery service URL from the ndgDiscovery.config
file + remove unused 'layoutdir' config property.

Location:
TI05-delivery/ows_framework/trunk/ows_server
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/ows_framework/trunk/ows_server/ndgDiscovery.config

    r3992 r4259  
    2121# 
    2222ndgServer:      %(server)s 
    23 # 
    24 # this is the physical file location of the layout directory on this machine  
    25 #  
    26 layoutdir:  
    27 # 
    28 # this should never be changed 
    2923# 
    3024##!NOTE: These are changed to  reflect the proxy prefix 
     
    7872 
    7973[HELP] 
    80 helpFile:       %(layoutdir)s%(layout)shelp.html 
     74helpFile:       %(layout)shelp.html 
    8175 
    8276[NDG_A_SERVICE] 
     
    312306#standalone: True 
    313307standalone: False 
     308#NB, if unset, this will default to the discovery service at ndg.badc.rl.ac.uk 
     309#discoveryServiceURL:http://localhost:8080/axis2/services/DiscoveryService 
    314310 
    315311[OWS_SERVER] 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/config/ndgMiddleware.py

    r4211 r4259  
    5252        self.globals.server=cf.get('DEFAULT','server','') 
    5353 
    54          
    5554        # for standalone discovery 
    56         self.globals.standalone=cf.config.getboolean('DISCOVERY','standalone')        
     55        self.globals.standalone=cf.config.getboolean('DISCOVERY','standalone') 
     56 
     57        # NB, without this set, the default host on ndg.badc.rl.ac.uk will be used by ndgSearch 
     58        if cf.config.has_option('DISCOVERY', 'discoveryServiceURL'): 
     59            self.globals.discoveryServiceURL = \ 
     60                cf.config.get('DISCOVERY', 'discoveryServiceURL')        
    5761 
    5862         
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/discovery.py

    r4198 r4259  
    141141        if self.inputs['searchTarget']=='Discovery': 
    142142            logging.info(" - use Discovery service to complete search") 
    143             ws=ndgSearch() 
     143            url = None 
     144            if hasattr(g, 'discoveryServiceURL'): 
     145                url = g.discoveryServiceURL 
     146            ws=ndgSearch(HostAndPort=url) 
    144147        elif self.inputs['searchTarget'] in ['Browse','NumSim']: 
    145148            logging.info(" - use Browse service to complete search") 
     
    247250            else: 
    248251                c.difs=difs 
    249                  
    250252                session['results']=h.current_url() 
    251253                session.save() 
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/models/stubB.py

    r4202 r4259  
    336336           
    337337            def doit(self,xml): 
    338                 layoutdir=self.c.get('layout','layoutdir') 
    339338                x=stubB(xml,self.c) 
    340339                 
Note: See TracChangeset for help on using the changeset viewer.