Changeset 4c65f67


Ignore:
Timestamp:
Dec 2, 2010 5:47:12 PM (13 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master
Children:
3cec20c
Parents:
61a634d
Message:

Fix debugging settings so that we can use create_debug

Location:
fedd/federation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/geniapi_proxy.py

    r61a634d r4c65f67  
    110110        tables above.
    111111        '''
    112         gmethod = self.method_map.get(method, method)
    113         gparams = [f(params) for f in self.arg_map.get(method, [])]
     112        if not self.debug:
     113            gmethod = self.method_map.get(method, method)
     114            gparams = [f(params) for f in self.arg_map.get(method, [])]
    114115
    115         return self.geniapi_call(self.cm_url, gmethod, gparams, context)
     116            return self.geniapi_call(self.cm_url, gmethod, gparams, context)
     117        else:
     118            if method in self.debug_fail:
     119                raise self.ProtoGENIError(op=method, code='unknown',
     120                        output='No output')
     121            elif self.debug_response.has_key(method):
     122                return self.debug_response[method]
     123            else:
     124                return "%s XML blob" % method
    116125
    117126
  • fedd/federation/protogeni_proxy.py

    r61a634d r4c65f67  
    2929        self.call_SetValue = service_caller('SetValue')
    3030
    31         self.debug_fail = ['Resolve']
     31        self.debug_fail = []
    3232        self.debug_response = {
    3333                'RedeemTicket': ("XML blob1", "XML blob2"),
    34                 'SliceStatus': { 'status': 'ready' },
     34                'SliverStatus': { 'status': 'ready' },
     35                'Resolve': {
     36                    'creator_urn': 'debugCreatorURN',
     37                    'urn': 'debugURN',
     38                    },
     39                'GetKeys': [ { 'key': 'k' } ],
     40                'CreateSliver': 'manifest',
    3541            }
    3642
Note: See TracChangeset for help on using the changeset viewer.