Changeset 14a2f95


Ignore:
Timestamp:
Feb 13, 2009 10:27:10 AM (15 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-1.30, version-2.00, version-3.01, version-3.02
Children:
8dfc06c
Parents:
c8c2c64
Message:

Add support for a command to be issued with the new gateway as the first parameter. The command is set by the destination testbed using the slaveconnectorcmd attribute and any additional parameters using the slaveconnectorcmdparams sttribute. There are analogous master attributes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/experiment_control.py

    rc8c2c64 r14a2f95  
    913913            'tunnelinterface': 'tunnelinterface',
    914914            'smbshare': 'smbshare',
     915            'slaveconnectorcmd': 'gwcmd',
     916            'slaveconnectorcmdparams': 'gwcmdparams',
     917            'masterconnectorcmd': 'mgwcmd',
     918            'masterconnectorcmdparams': 'mgwcmdparams',
    915919        }
    916920
     
    11011105            self.def_gwimage = "FBSD61-TUNNEL2";
    11021106            self.def_gwtype = "pc";
     1107            self.def_mgwcmd = '# '
     1108            self.def_mgwcmdparams = ''
     1109            self.def_gwcmd = '# '
     1110            self.def_gwcmdparams = ''
    11031111
    11041112            self.eid = eid
     
    11571165                            self.def_expstart)
    11581166                    project = tbparams[self.current_testbed].get('project')
     1167                    gwcmd = tbparams[self.current_testbed].get('gwcmd',
     1168                            self.def_gwcmd)
     1169                    gwcmdparams = tbparams[self.current_testbed].get(\
     1170                            'gwcmdparams', self.def_gwcmdparams)
     1171                    mgwcmd = tbparams[self.current_testbed].get('mgwcmd',
     1172                            self.def_gwcmd)
     1173                    mgwcmdparams = tbparams[self.current_testbed].get(\
     1174                            'mgwcmdparams', self.def_gwcmdparams)
    11591175                    line = re.sub("GWTYPE", gwtype, line)
    11601176                    line = re.sub("GWIMAGE", gwimage, line)
     
    11621178                        line = re.sub("GWSTART", mgwstart, line)
    11631179                        line = re.sub("EXPSTART", mexpstart, line)
     1180                        # NB GWCMDPARAMS is a prefix of GWCMD, so expand first
     1181                        line = re.sub("GWCMDPARAMS", mgwcmdparams, line)
     1182                        line = re.sub("(#\s*)?GWCMD", mgwcmd, line)
    11641183                    else:
    11651184                        line = re.sub("GWSTART", gwstart, line)
    11661185                        line = re.sub("EXPSTART", expstart, line)
     1186                        # NB GWCMDPARAMS is a prefix of GWCMD, so expand first
     1187                        line = re.sub("GWCMDPARAMS", gwcmdparams, line)
     1188                        line = re.sub("(#\s*)?GWCMD", gwcmd, line)
    11671189                    line = re.sub("GWCONF", "FEDDIR`hostname`.gw.conf", line)
    11681190                    line = re.sub("PROJDIR", "/proj/%s/" % project, line)
Note: See TracChangeset for help on using the changeset viewer.