Index: fedd/fedd_bindings.wsdl
===================================================================
--- fedd/fedd_bindings.wsdl	(revision a8b42b50629f13b6fcbf8d4af28d22a065cf5511)
+++ fedd/fedd_bindings.wsdl	(revision 7a8d667972e8db4da477c0270c54dab48255d853)
@@ -122,4 +122,25 @@
 	</fault>
       </operation>
+      <operation name="Terminate">
+	<documentation>
+	  The bindings of this operation are straightforward SOAP RPC 1.1.
+	</documentation>
+	<soap:operation soapAction="Terminate"/> 
+	<input>
+	  <soap:body use="encoded" parts="tns:TerminateRequestBody"
+	    namespace="http://www.isi.edu/faber/fedd.wsdl"
+	    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+	</input>
+	<output>
+	  <soap:body use="encoded" parts="tns:TerminateResponseBody"
+	    namespace="http://www.isi.edu/faber/fedd.wsdl"
+	    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+	</output>
+	<fault>
+	  <soap:fault use="encoded"  name="tns:FeddFault"
+	    namespace="http://www.isi.edu/faber/fedd.wsdl"
+	    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+	</fault>
+      </operation>
     </binding>
 
Index: fedd/fedd_client.py
===================================================================
--- fedd/fedd_client.py	(revision a8b42b50629f13b6fcbf8d4af28d22a065cf5511)
+++ fedd/fedd_client.py	(revision 7a8d667972e8db4da477c0270c54dab48255d853)
@@ -425,4 +425,70 @@
 	    print resp_dict
 
+class terminate(fedd_rpc):
+    def __init__(self): 
+	"""
+	Termination request
+	"""
+
+	fedd_rpc.__init__(self, "Terminate")
+
+    def __call__(self):
+	"""
+	The control flow.  Compose the request and print the response.
+	"""
+	# Process the options using the customized option parser defined above
+	parser = fedd_exp_data_opts()
+
+	(opts, args) = parser.parse_args()
+
+	if opts.trusted != None:
+	    if ( not os.access(opts.trusted, os.R_OK) ) :
+		sys.exit("Cannot read trusted certificates (%s)" % opts.trusted)
+	else:
+	    parser.error("--trusted is required")
+
+	if opts.debug > 0: opts.tracefile=sys.stderr
+
+	if opts.cert != None: cert = opts.cert
+
+	if cert == None:
+	    sys.exit("No certificate given (--cert) or found")
+
+	if os.access(cert, os.R_OK):
+	    fid = fedid(file=cert)
+	else:
+	    sys.exit("Cannot read certificate (%s)" % cert)
+
+	if opts.exp_name and opts.exp_certfile:
+	    sys.exit("Only one of --experiment_cert and " +\
+		    "--experiment_name permitted");
+
+	if opts.exp_certfile:
+	    exp_id = { 'fedid': fedid(file=opts.exp_certfile) }
+
+	if opts.exp_name:
+	    exp_id = { 'localname' : opts.exp_name }
+
+	req = { 'experiment': exp_id }
+
+	try:
+	    resp_dict = self.do_rpc(req,
+		    opts.url, opts.transport, cert, opts.trusted, 
+		    serialize_only=opts.serialize_only,
+		    tracefile=opts.tracefile)
+	except self.RPCException, e:
+	    exit_with_fault(\
+		    {'desc': e.desc, 'errstr': e.errstr, 'code': e.code})
+	except RuntimeError, e:
+	    print e
+	    sys.exit("Error processing RPC: %s" % e)
+
+	eid = resp_dict.get('experimentID', None)
+	if eid:
+	    for id in eid:
+		for k in id.keys():
+		    if k == 'fedid': print "%s: %s" % (k,fedid(bits=id[k]))
+		    else: print "%s: %s" % (k, id[k])
+
 class create(fedd_rpc):
     def __init__(self): 
@@ -637,4 +703,5 @@
 	'vis': exp_data('Vis'),\
 	'info': exp_data('Info'),\
+	'terminate': terminate(),\
     }
 
Index: fedd/fedd_create_experiment.py
===================================================================
--- fedd/fedd_create_experiment.py	(revision a8b42b50629f13b6fcbf8d4af28d22a065cf5511)
+++ fedd/fedd_create_experiment.py	(revision 7a8d667972e8db4da477c0270c54dab48255d853)
@@ -32,6 +32,5 @@
     scripts = ["fed_bootstrap", "federate.sh", "smbmount.FreeBSD.pl",
 	"smbmount.Linux.pl", "make_hosts", "fed-tun.pl", "fed-tun.ucb.pl",
-	"fed_evrepeater", "rc.accounts.patch", "daemon.py",
-	"experiment-setup.py"]
+	"fed_evrepeater", "rc.accounts.patch"]
     
     def __init__(self, 
@@ -693,4 +692,6 @@
 		"emulab" : e
 		}
+	# Make the testbed name be the label the user applied
+	p['testbed'] = {'localname': tb }
 
 	for u in p['user']:
@@ -1400,4 +1401,65 @@
 	    raise service_error(service_error.req, "No such experiment")
 
+
+
+    def terminate_experiment(self, req, fid):
+	tbparams = { }
+	req = req.get('TerminateRequestBody', None)
+	if not req:
+	    raise service_error(service_error.req,
+		    "Bad request format (no TerminateRequestBody)")
+	exp = req.get('experiment', None)
+	if exp:
+	    if exp.has_key('fedid'):
+		key = fedid(bits=exp['fedid'])
+		keytype = "fedid"
+	    elif exp.has_key('localname'):
+		key = exp['localname']
+		keytype = "localname"
+	    else:
+		raise service_error(service_error.req, "Unknown lookup type")
+	else:
+	    raise service_error(service_error.req, "No request?")
+
+	fed_exp = self.state.get(key, None)
+
+	if fed_exp:
+	    # Construct enough of the tbparams to make the stop_segment calls
+	    # work
+	    for fed in fed_exp['federant']:
+		try:
+		    for e in fed['name']:
+			eid = e.get('localname', None)
+			if eid: break
+		    else:
+			continue
+
+		    p = fed['emulab']['project']
+
+		    project = p['name']['localname']
+		    tb = p['testbed']['localname']
+		    user = p['user'][0]['userID']['localname']
+
+		    domain = fed['emulab']['domain']
+		    host  = "%s%s" % (fed['emulab']['ops'], domain)
+		except KeyError, e:
+		    continue
+		tbparams[tb] = {\
+			'user': user,\
+			'domain': domain,\
+			'project': project,\
+			'host': host,\
+			'eid': eid,\
+		    }
+	    # Stop everyone.
+	    for tb in tbparams.keys():
+		self.stop_segment(tb, tbparams[tb]['eid'], tbparams)
+	    return { 'experiment': exp }
+	else:
+	    raise service_error(service_error.req, "No saved state")
+
+
+
+
 if __name__ == '__main__':
     from optparse import OptionParser
Index: fedd/fedd_messages.wsdl
===================================================================
--- fedd/fedd_messages.wsdl	(revision a8b42b50629f13b6fcbf8d4af28d22a065cf5511)
+++ fedd/fedd_messages.wsdl	(revision 7a8d667972e8db4da477c0270c54dab48255d853)
@@ -47,4 +47,13 @@
   </message>
 
+
+  <message name="TerminateRequestMessage">
+    <part name="TerminateRequestBody" type="xsd1:terminateRequestType"/>
+  </message>
+
+  <message name="TerminateResponseMessage">
+    <part name="TerminateResponseBody" type="xsd1:terminateResponseType"/>
+  </message>
+
   <message name="FaultMessage">
     <part name="FaultBody" type="xsd1:faultType"/>
@@ -92,4 +101,12 @@
       <fault name="FeddFault" message="tns:FaultMessage"/>
     </operation>
+    <operation name="Terminate">
+      <documentation>
+	Fill this in 
+      </documentation>
+      <input message="tns:TerminateRequestMessage"/>
+      <output message="tns:TerminateResponseMessage"/>
+      <fault name="FeddFault" message="tns:FaultMessage"/>
+    </operation>
   </portType>
 </definitions>
Index: fedd/fedd_proj.py
===================================================================
--- fedd/fedd_proj.py	(revision a8b42b50629f13b6fcbf8d4af28d22a065cf5511)
+++ fedd/fedd_proj.py	(revision 7a8d667972e8db4da477c0270c54dab48255d853)
@@ -51,4 +51,5 @@
 	    'Vis' : 'soap_Vis',\
 	    'Info' : 'soap_Info',\
+	    'Terminate' : 'soap_Terminate',\
 	    }
     xmlrpc_methods = { \
@@ -58,4 +59,5 @@
 	    'Vis' : 'xmlrpc_Vis',\
 	    'Info' : 'xmlrpc_Info',\
+	    'Terminate' : 'xmlrpc_Terminate',\
 	    }
 
@@ -613,4 +615,16 @@
 	return resp
 
+    def soap_Terminate(self, ps, fid):
+	req = ps.Parse(TerminateRequestMessage.typecode)
+
+	msg = self.create_experiment.terminate_experiment(unpack_soap(req),
+		fedid)
+
+	resp = TerminateResponseMessage()
+	resp.set_element_TerminateResponseBody(
+		pack_soap(resp, "TerminateResponseBody", msg))
+
+	return resp
+
     def xmlrpc_RequestAccess(self, params, fid):
 	msg = self.RequestAccess(params[0], fedid)
@@ -660,4 +674,15 @@
 	if msg != None:
 	    return encapsulate_binaries({ "InfoResponseBody" : msg },
+		    ('fedid',))
+	else:
+	    raise service_error(service_error.internal,
+		    "No response generated?!")
+
+
+    def xmlrpc_Terminate(self, params, fid):
+	p = decapsulate_binaries(params[0], ('fedid',))
+	msg = self.create_experiment.terminate_experiment(p, fedid)
+	if msg != None:
+	    return encapsulate_binaries({ "TerminateResponseBody" : msg },
 		    ('fedid',))
 	else:
Index: fedd/fedd_types.xsd
===================================================================
--- fedd/fedd_types.xsd	(revision a8b42b50629f13b6fcbf8d4af28d22a065cf5511)
+++ fedd/fedd_types.xsd	(revision 7a8d667972e8db4da477c0270c54dab48255d853)
@@ -420,4 +420,27 @@
     </xsd:sequence>
   </xsd:complexType>
+
+  <xsd:complexType name="terminateRequestType">
+    <xsd:annotation>
+      <xsd:documentation>
+	Request to terminate an experiment
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:sequence>
+      <xsd:element name="experiment" type="tns:IDType"/>
+    </xsd:sequence>
+  </xsd:complexType>
+
+  <xsd:complexType name="terminateResponseType">
+    <xsd:annotation>
+      <xsd:documentation>
+	Request to terminate an experiment
+      </xsd:documentation>
+    </xsd:annotation>
+    <xsd:sequence>
+      <xsd:element name="experiment" type="tns:IDType"/>
+    </xsd:sequence>
+  </xsd:complexType>
+
 
   <xsd:complexType name="faultType">
