- Timestamp:
- Mar 12, 2014 6:09:53 PM (11 years ago)
- Branches:
- master
- Children:
- ba07149
- Parents:
- 4cf0198
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/access.py
r4cf0198 rd846cbe 745 745 store = p.get('store', None) 746 746 747 if name and key and store : 748 req = { 'name': key, 'wait': True } 749 self.log.debug("Waiting for %s (%s) from %s" % \ 750 (name, key, store)) 751 r = self.call_GetValue(store, req, cf) 752 r = r.get('GetValueResponseBody', None) 753 if r : 754 if r.get('name', '') == key: 755 v = r.get('value', None) 756 if v is not None: 757 if name == 'peer': 758 self.log.debug("Got peer %s" % v) 759 c['peer'] = v 760 else: 761 self.log.debug("Got %s %s" % (name, v)) 762 if c.has_key('fedAttr'): 763 c['fedAttr'].append({ 764 'attribute': name, 'value': v}) 765 else: 766 c['fedAttr']= [{ 767 'attribute': name, 'value': v}] 768 else: 769 raise service_error(service_error.internal, 770 'None value exported for %s' % key) 771 else: 772 raise service_error(service_error.internal, 773 'Different name returned for %s: %s' \ 774 % (key, r.get('name',''))) 775 else: 776 raise service_error(service_error.internal, 777 'Badly formatted response: no GetValueResponseBody') 778 else: 747 if not all((name, key, store)): 779 748 raise service_error(service_error.internal, 780 749 'Bad Services missing info for import %s' % c) 750 751 req = { 'name': key, 'wait': True } 752 self.log.debug("Waiting for %s (%s) from %s" % \ 753 (name, key, store)) 754 r = self.call_GetValue(store, req, cf) 755 r = r.get('GetValueResponseBody', None) 756 if r is None: 757 raise service_error(service_error.internal, 758 'Badly formatted response: no GetValueResponseBody') 759 if r.get('name', '') != key: 760 raise service_error(service_error.internal, 761 'Different name returned for %s: %s' \ 762 % (key, r.get('name',''))) 763 v = r.get('value', None) 764 if v is None: 765 raise service_error(service_error.internal, 766 'None value exported for %s' % key) 767 if name == 'peer': 768 self.log.debug("Got peer %s" % v) 769 c['peer'] = v 770 else: 771 self.log.debug("Got %s %s" % (name, v)) 772 if c.has_key('fedAttr'): 773 c['fedAttr'].append({ 774 'attribute': name, 'value': v}) 775 else: 776 c['fedAttr']= [{ 777 'attribute': name, 'value': v}] 781 778 782 779 def remove_dirs(self, dir):
Note: See TracChangeset
for help on using the changeset viewer.