Changeset 68bb551


Ignore:
Timestamp:
Sep 17, 2009 5:23:32 PM (15 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-2.00, version-3.01, version-3.02
Children:
157ac77
Parents:
23dec62
Message:

Get the allocation log into the response and add the vlan number as an attribute. Some misc debugging code removed as well.

Next, we make the experiment controller deal with this new thing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/dragon_access.py

    r23dec62 r68bb551  
    581581                        close_fds=True)
    582582                for line in p.stdout:
    583                     log.debug("Line from createReservation: %s" %line)
    584583                    m = status_re.match(line)
    585584                    if m:
     
    600599
    601600            while status in ('ACCEPTED', 'INSETUP', 'PENDING'):
    602                 time.sleep(30)
     601                time.sleep(5)
    603602                log.debug("[start_segment]: %s" % " ".join(cmd))
    604603                if not self.create_debug:
     
    612611                    dest = None
    613612                    for line in p.stdout:
    614                         log.debug("Line from query: %s" %line)
    615613                        if not in_path:
    616614                            m = status_re.match(line)
     
    661659                        raise service_error(service_error.internal,
    662660                                "Different VPNs on DRAGON ends")
     661                    log.debug("Status: %s" % status or "none")
    663662                else:
    664663                    status = 'ACTIVE'
     
    741740                    "Can't find creation user for %s" %aid)
    742741
    743         gri, vlan_no = self.start_segment(repo, src, dest, cap, vlans)
    744         print "back from start_segement %s %d" % (gri, vlan_no)
     742        gri, vlan_no = self.start_segment(repo, src, dest, cap, vlans,
     743                log=alloc_log)
    745744
    746745        if gri:
     
    753752            self.state_lock.release()
    754753
    755             print "returning %s " %  { 'allocID': req['allocID'], 'allocationLog': logv }
    756             return { 'allocID': req['allocID'], 'allocationLog': logv }
     754            return {
     755                    'allocID': req['allocID'],
     756                    'allocationLog': logv,
     757                    'fedAttr': [
     758                        {'attribute': 'vlan', 'value': '%d' % vlan_no }
     759                        ]
     760                    }
    757761        elif err:
    758762            raise service_error(service_error.federant,
Note: See TracChangeset for help on using the changeset viewer.