Changeset c7141dc
- Timestamp:
- Jan 9, 2012 4:52:54 PM (13 years ago)
- Branches:
- compt_changes, info-ops, master
- Children:
- d2e86f6
- Parents:
- 06c1dba
- Location:
- fedd/federation
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/access.py
r06c1dba rc7141dc 27 27 import topdl 28 28 import list_log 29 import proxy_emulab_segment30 import local_emulab_segment31 29 32 30 -
fedd/federation/deter_internal_access.py
r06c1dba rc7141dc 25 25 import topdl 26 26 import list_log 27 import proxy_emulab_segment28 import local_emulab_segment29 27 30 28 from access import access_base -
fedd/federation/dragon_access.py
r06c1dba rc7141dc 27 27 import topdl 28 28 import list_log 29 import proxy_emulab_segment30 import local_emulab_segment31 29 32 30 -
fedd/federation/emulab_access.py
r06c1dba rc7141dc 1175 1175 starter = self.start_segment(keyfile=self.ssh_privkey_file, 1176 1176 debug=self.create_debug, log=alloc_log, boss=self.boss, 1177 cert=self.xmlrpc_cert)1177 ops=self.ops, cert=self.xmlrpc_cert) 1178 1178 rv = starter(self, ename, proj, user, expfile, tmpdir, gid=gid) 1179 1179 except service_error, e: … … 1241 1241 "Can't find experiment name for %s" % aid) 1242 1242 stopper = self.stop_segment(keyfile=self.ssh_privkey_file, 1243 debug=self.create_debug, boss=self.boss, cert=self.xmlrpc_cert) 1243 debug=self.create_debug, boss=self.boss, ops=self.ops, 1244 cert=self.xmlrpc_cert) 1244 1245 stopper(self, user, proj, ename, gid, nonce) 1245 1246 return { 'allocID': req['allocID'], 'proof': proof.to_dict() } … … 1289 1290 "Can't find experiment name for %s" % aid) 1290 1291 info = self.info_segment(keyfile=self.ssh_privkey_file, 1291 debug=self.create_debug, boss=self.boss, cert=self.xmlrpc_cert) 1292 debug=self.create_debug, boss=self.boss, ops=self.ops, 1293 cert=self.xmlrpc_cert) 1292 1294 info(self, user, proj, ename) 1293 1295 self.decorate_topology(info, topo) … … 1357 1359 1358 1360 ops = self.operation_segment(keyfile=self.ssh_privkey_file, 1359 debug=self.create_debug, boss=self.boss, 1361 debug=self.create_debug, boss=self.boss, ops=self.ops, 1360 1362 cert=self.xmlrpc_cert) 1361 1363 ops(self, op, ptargets, params, topo) -
fedd/federation/emulab_segment.py
r06c1dba rc7141dc 18 18 class start_segment(ssh_emulab_segment, xmlrpc_emulab_segment): 19 19 def __init__(self, log=None, keyfile=None, debug=False, boss=None, 20 cert=None):20 ops=None, cert=None): 21 21 ssh_emulab_segment.__init__(self, log=log, keyfile=keyfile, debug=debug) 22 xmlrpc_emulab_segment.__init__(self, boss=boss, cert=cert)22 xmlrpc_emulab_segment.__init__(self, boss=boss, ops=ops, cert=cert) 23 23 24 24 def set_up_experiment_filespace(self, user, host, pid, eid, tmpdir): … … 100 100 return False 101 101 102 if not self.set_up_experiment_filespace(pid, eid, tmpdir): 102 if not self.set_up_experiment_filespace(user, self.ops, 103 pid, eid, tmpdir): 103 104 return False 104 105 … … 122 123 return True 123 124 124 class stop_segment( local_segment,emulab_segment):125 class stop_segment(ssh_emulab_segment, xmlrpc_emulab_segment): 125 126 def __init__(self, log=None, keyfile=None, debug=False, boss=None, 126 cert=None):127 local_segment.__init__(self, log=log, keyfile=keyfile, debug=debug)128 emulab_segment.__init__(self, boss=boss, cert=cert)127 ops=None, cert=None): 128 ssh_emulab_segment.__init__(self, log=log, keyfile=keyfile, debug=debug) 129 xmlrpc_emulab_segment.__init__(self, boss=boss, ops=ops, cert=cert) 129 130 130 131 def __call__(self, parent, user, pid, eid, gid=None, terminate=False): … … 137 138 try: 138 139 # Clean out tar files: we've gone over quota in the past 139 self.ssh_cmd("rm -rf /proj/%s/software/%s" % (pid, eid)) 140 self.ssh_cmd(user, self.ops, 141 "rm -rf /proj/%s/software/%s" % (pid, eid)) 140 142 rv = self.swap_exp(pid, eid, 'out') 141 143 if terminate: … … 145 147 return rv 146 148 147 class info_segment( local_segment,emulab_segment):149 class info_segment(ssh_emulab_segment, xmlrpc_emulab_segment): 148 150 def __init__(self, log=None, keyfile=None, debug=False, boss=None, 149 cert=None):150 local_segment.__init__(self, log=log, keyfile=keyfile, debug=debug)151 emulab_segment.__init__(self, boss=boss, cert=cert)151 ops=None, cert=None): 152 ssh_emulab_segment.__init__(self, log=log, keyfile=keyfile, debug=debug) 153 xmlrpc_emulab_segment.__init__(self, boss=boss, ops=ops, cert=cert) 152 154 153 155 def __call__(self, parent, user, pid, eid): … … 156 158 return True 157 159 158 class operation_segment( local_segment,emulab_segment):160 class operation_segment(ssh_emulab_segment, xmlrpc_emulab_segment): 159 161 def __init__(self, log=None, keyfile=None, debug=False, boss=None, 160 cert=None):161 local_segment.__init__(self, log=log, keyfile=keyfile, debug=debug)162 emulab_segment.__init__(self, boss=boss, cert=cert)162 ops=None, cert=None): 163 ssh_emulab_segment.__init__(self, log=log, keyfile=keyfile, debug=debug) 164 xmlrpc_emulab_segment.__init__(self, boss=boss, ops=ops, cert=cert) 163 165 164 166 def __call__(self, parent, op, targets, param, top): -
fedd/federation/legacy_access.py
r06c1dba rc7141dc 27 27 import topdl 28 28 import list_log 29 import proxy_emulab_segment30 import local_emulab_segment31 29 32 30 -
fedd/federation/ssh_emulab_segment.py
r06c1dba rc7141dc 26 26 using ssh. 27 27 """ 28 self.log = log or logging.getLogger('fedd.access. proxy_segment')28 self.log = log or logging.getLogger('fedd.access.ssh_emulab_segment') 29 29 self.ssh_privkey_file = keyfile 30 30 self.debug = debug 31 31 self.ssh_exec="/usr/bin/ssh" 32 32 self.scp_exec = "/usr/bin/scp" 33 self.ssh_cmd_timeout = proxy_segment.ssh_cmd_timeout33 self.ssh_cmd_timeout = ssh_emulab_segment.ssh_cmd_timeout 34 34 35 35 def scp_file(self, file, user, host, dest=""): -
fedd/federation/xmlrpc_emulab_segment.py
r06c1dba rc7141dc 36 36 return rv 37 37 38 def __init__(self, boss, cert):38 def __init__(self, boss, ops, cert): 39 39 self.ctxt = fedd_ssl_context(my_cert=cert) 40 40 self.ctxt.set_verify(SSL.verify_none, 10) 41 41 self.boss = boss 42 self.ops = ops 42 43 self.null = """ 43 44 set ns [new Simulator] … … 53 54 self.node = { } 54 55 self.status = [ ] 55 self.node_info = emulab_segment.node_info56 self.node_info = xmlrpc_emulab_segment.node_info 56 57 57 58 def emulab_call(self, method, params):
Note: See TracChangeset
for help on using the changeset viewer.