Changeset b535e19
- Timestamp:
- Jun 1, 2009 3:06:52 PM (15 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-1.30, version-2.00, version-3.01, version-3.02
- Children:
- a0c12a6
- Parents:
- b8a9fb7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/experiment_control.py
rb8a9fb7 rb535e19 919 919 Get access to testbed through fedd and set the parameters for that tb 920 920 """ 921 922 # XXX This is needless complexity. It must vanish.923 translate_attr = {924 'slavenodestartcmd': 'expstart',925 'slaveconnectorstartcmd': 'gwstart',926 'masternodestartcmd': 'mexpstart',927 'masterconnectorstartcmd': 'mgwstart',928 'connectorimage': 'gwimage',929 'connectortype': 'gwtype',930 'tunnelcfg': 'tun',931 'tunnelinterface': 'tunnelinterface',932 'smbshare': 'smbshare',933 'slaveconnectorcmd': 'gwcmd',934 'slaveconnectorcmdparams': 'gwcmdparams',935 'masterconnectorcmd': 'mgwcmd',936 'masterconnectorcmdparams': 'mgwcmdparams',937 }938 939 921 uri = self.tbmap.get(tb, None) 940 922 if not uri: … … 1054 1036 "No createExperimentUser from %s" %tb) 1055 1037 1038 # Add attributes to barameter space. We don't allow attributes to 1039 # overlay any parameters already installed. 1056 1040 for a in e['fedAttr']: 1057 if a['attribute']: 1058 key = translate_attr.get(a['attribute'].lower(), None) 1059 if key: 1060 tbparam[tb][key]= a['value'] 1041 try: 1042 if a['attribute'] and isinstance(a['attribute'], basestring)\ 1043 and not tbparam[tb].has_key(a['attribute'].lower()): 1044 tbparam[tb][a['attribute'].lower()] = a['value'] 1045 except KeyError: 1046 self.log.error("Bad attribute in response: %s" % a) 1061 1047 1062 1048 def release_access(self, tb, aid): … … 1184 1170 # Substitute variables and put the line into the local 1185 1171 # testbed file. 1186 gwtype = tbparams[self.current_testbed].get( 'gwtype',1187 self.def_gwtype)1188 gwimage = tbparams[self.current_testbed].get( 'gwimage',1189 self.def_gwimage)1190 mgwstart = tbparams[self.current_testbed].get( 'mgwstart',1191 self.def_mgwstart)1192 mexpstart = tbparams[self.current_testbed].get( 'mexpstart',1193 self.def_mexpstart)1194 gwstart = tbparams[self.current_testbed].get( 'gwstart',1195 self.def_gwstart)1196 expstart = tbparams[self.current_testbed].get( 'expstart',1197 self.def_expstart)1172 gwtype = tbparams[self.current_testbed].get(\ 1173 'connectortype', self.def_gwtype) 1174 gwimage = tbparams[self.current_testbed].get(\ 1175 'connectorimage', self.def_gwimage) 1176 mgwstart = tbparams[self.current_testbed].get(\ 1177 'masterconnectorstartcmd', self.def_mgwstart) 1178 mexpstart = tbparams[self.current_testbed].get(\ 1179 'masternodestartcmd', self.def_mexpstart) 1180 gwstart = tbparams[self.current_testbed].get(\ 1181 'slaveconnectorstartcmd', self.def_gwstart) 1182 expstart = tbparams[self.current_testbed].get(\ 1183 'slavenodestartcmd', self.def_expstart) 1198 1184 project = tbparams[self.current_testbed].get('project') 1199 gwcmd = tbparams[self.current_testbed].get( 'gwcmd',1200 self.def_gwcmd)1185 gwcmd = tbparams[self.current_testbed].get(\ 1186 'slaveconnectorcmd', self.def_gwcmd) 1201 1187 gwcmdparams = tbparams[self.current_testbed].get(\ 1202 ' gwcmdparams', self.def_gwcmdparams)1203 mgwcmd = tbparams[self.current_testbed].get( 'mgwcmd',1204 self.def_gwcmd)1188 'slaveconnectorcmdparams', self.def_gwcmdparams) 1189 mgwcmd = tbparams[self.current_testbed].get(\ 1190 'masterconnectorcmd', self.def_gwcmd) 1205 1191 mgwcmdparams = tbparams[self.current_testbed].get(\ 1206 'm gwcmdparams', self.def_gwcmdparams)1192 'masterconnectorcmdparams', self.def_gwcmdparams) 1207 1193 line = re.sub("GWTYPE", gwtype, line) 1208 1194 line = re.sub("GWIMAGE", gwimage, line) … … 1316 1302 local_key_dir = "/proj/%s/exp/%s/tmp" % ( sproject, eid) 1317 1303 remote_conf_dir = "/proj/%s/exp/%s/tmp" % ( dproject, eid) 1318 tunnel_cfg = tbparams[gw].get("tun ", "false")1304 tunnel_cfg = tbparams[gw].get("tunnelcfg", "false") 1319 1305 1320 1306 conf_file = "%s%s.gw.conf" % (myname, sdomain)
Note: See TracChangeset
for help on using the changeset viewer.