Changeset 3159f5d


Ignore:
Timestamp:
Mar 17, 2010 2:27:33 AM (15 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
Children:
1dcaff4
Parents:
76441b6
Message:

Set up the repote splitter to translate into a topdl description. It has thus
become misnamed.

Location:
fedd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • fedd/fedd_client.py

    r76441b6 r3159f5d  
    15111511        if os.access(cert, os.R_OK):
    15121512            fid = fedid(file=cert)
    1513             if opts.use_fedid == True:
    1514                 user = fid
    15151513        else:
    15161514            sys.exit("Cannot read certificate (%s)" % cert)
     
    15561554        if opts.debug > 1: print >>sys.stderr, resp_dict
    15571555
    1558         out = resp_dict.get('output', None)
    1559 
    1560         for line in out.splitlines():
    1561             print "%s" % line
     1556        ed = resp_dict.get('experimentdescription', None)
     1557        if ed:
     1558            if ed.has_key('topdldescription'):
     1559                topo = topdl.Topology(**ed['topdldescription'])
     1560                print topdl.topology_to_xml(topo, 'experiment')
    15621561
    15631562class access(fedd_rpc):
  • fedd/federation/split.py

    r76441b6 r3159f5d  
    55import tempfile
    66import logging
     7import topdl
    78
    89from util import *
     
    128129       
    129130       
    130         tclcmd = [self.tclsh, self.tcl_splitter, '-s', '-x',
     131        tclcmd = [self.tclsh, self.tcl_splitter, '-t', '-x',
    131132            str(self.muxmax), '-m', master]
    132133        if include_fedkit: tclcmd.append('-k')
     
    135136        tclparser = subprocess.Popen(tclcmd, stdout=subprocess.PIPE)
    136137
    137         out = ""
    138         # Package up the split data
    139         for line in tclparser.stdout:
    140             out += line
     138        top = topdl.topology_from_xml(file=tclparser.stdout, top="experiment")
    141139
    142140        # Walk up tmpdir, deleting as we go
     
    148146        os.rmdir(tmpdir)
    149147
    150         resp = { 'output' : out }
     148        resp = {
     149                'experimentdescription':  {
     150                    'topdldescription': top.to_dict(),
     151                    }
     152                }
    151153
    152154        return resp
Note: See TracChangeset for help on using the changeset viewer.