Changeset 9556f2a for fedd/federation


Ignore:
Timestamp:
Dec 7, 2010 12:53:58 PM (14 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master
Children:
8445caf
Parents:
2453416
Message:

Deal with ZSI 2.1 by name aliases. The 2.1 function seems the same, so these simply alias the new names to the old if the old are unavailable.

Location:
fedd/federation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/remote_service.py

    r2453416 r9556f2a  
    2121    import fedd_services
    2222    import fedd_internal_services
     23    service_port_name = 'getfeddPortType'
     24    internal_service_port_name = 'getfeddInternalPortType'
    2325except ImportError:
    24     import fedd_server
    2526    import fedd_client
     27    import fedd_internal_client
     28    fedd_services = fedd_client
     29    fedd_internal_services = fedd_internal_client
     30    service_port_name = 'getfeddPort'
     31    internal_service_port_name = 'getfedd_internalPort'
    2632
    2733from util import fedd_ssl_context
     
    283289        self.service_name = service_name
    284290
    285         try:
    286             if getattr(fedd_services.feddBindingSOAP, service_name, None):
    287                 self.locator = fedd_services.feddServiceLocator
    288                 self.port_name = 'getfeddPortType'
    289             elif getattr(fedd_internal_services.feddInternalBindingSOAP,
    290                     service_name, None):
    291                 self.locator = fedd_internal_services.feddInternalServiceLocator
    292                 self.port_name = 'getfeddInternalPortType'
    293         except NameError:
    294             if getattr(fedd_client.feddBindingSOAP, service_name, None):
    295                 self.locator = fedd_client.feddServiceLocator
    296                 self.port_name = 'getfeddPort'
    297             elif getattr(fedd_internal_client.feddInternalBindingSOAP,
    298                     service_name, None):
    299                 self.locator = fedd_internal_client.feddInternalServiceLocator
    300                 self.port_name = 'getfedd_internalPort'
    301 
     291        if getattr(fedd_services.feddBindingSOAP, service_name, None):
     292            self.locator = fedd_services.feddServiceLocator
     293            self.port_name = service_port_name
     294        elif getattr(fedd_internal_services.feddInternalBindingSOAP,
     295                service_name, None):
     296            self.locator = fedd_internal_services.feddInternalServiceLocator
     297            self.port_name = internal_service_port_name
    302298
    303299        if request_message: self.request_message = request_message
  • fedd/federation/server.py

    r2453416 r9556f2a  
    1313
    1414from fedid import fedid
    15 from fedd_services import ns0
     15try:
     16    from fedd_services import ns0
     17except ImportError:
     18    from fedd_server import ns0
     19
    1620from service_error import *
    1721
Note: See TracChangeset for help on using the changeset viewer.