Ignore:
Timestamp:
Oct 5, 2011 5:11:01 PM (13 years ago)
Author:
Ted Faber <faber@…>
Branches:
compt_changes, info-ops, master
Children:
b6a6206
Parents:
53b5c18
git-author:
Ted Faber <faber@…> (10/05/11 17:10:01)
git-committer:
Ted Faber <faber@…> (10/05/11 17:11:01)
Message:

Simple support for experiments in groups. Closes #32

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/proxy_emulab_segment.py

    r53b5c18 rf3898f7  
    158158
    159159
    160     def make_null_experiment(self, user, host, pid, eid, tmpdir):
     160    def make_null_experiment(self, user, host, pid, eid, tmpdir, gid=None):
    161161        """
    162162        Create a null copy of the experiment so that we capture any logs there
     
    164164        startexp
    165165        """
     166
     167        if gid is not None: gparam = '-g %s' % gid
     168        else: gparam = ''
     169
    166170        try:
    167171            f = open("%s/null.tcl" % tmpdir, "w")
     
    179183            if not self.ssh_cmd(user, host,
    180184                    ("/usr/testbed/bin/startexp -i -f -w -p %s " +
    181                     "-e %s null.tcl") % (pid, eid), "startexp",
     185                    "-e %s %s null.tcl") % (pid, eid, gparam), "startexp",
    182186                    timeout=60 * 10):
    183187                return False
     
    276280
    277281
    278     def __call__(self, parent, eid, pid, user, tclfile, tmpdir, timeout=0):
     282    def __call__(self, parent, eid, pid, user, tclfile, tmpdir, timeout=0,
     283            gid=None):
    279284        """
    280285        Start a sub-experiment on a federant.
     
    294299            # Put a dummy in place to capture logs, and establish an experiment
    295300            # directory.
    296             if not self.make_null_experiment(user, host, pid, eid, tmpdir):
     301            if not self.make_null_experiment(user, host, pid, eid, tmpdir, gid):
    297302                return False
    298303
     
    325330        proxy_segment.__init__(self, log=log, keyfile=keyfile, debug=debug)
    326331
    327     def __call__(self, parent, user, pid, eid):
     332    def __call__(self, parent, user, pid, eid, gid=None):
    328333        """
    329334        Stop a sub experiment by calling swapexp on the federant
Note: See TracChangeset for help on using the changeset viewer.