Index: fedd/fedd_client.py
===================================================================
--- fedd/fedd_client.py	(revision f00fb7d6cf3235dee2b83b1c58b75fb38fec9abd)
+++ fedd/fedd_client.py	(revision d743d608dbdafa2f98011b33e8beaecca5e92296)
@@ -82,5 +82,6 @@
         self.add_option("--trace", action="store_const", dest="tracefile", 
                 const=sys.stderr, help="Print SOAP exchange to stderr")
-class fedd_new_opts(fedd_client_opts):
+
+class fedd_access_opts(fedd_client_opts):
     def __init__(self):
         fedd_client_opts.__init__(self)
@@ -89,8 +90,14 @@
         self.add_option("--experiment_name", dest="exp_name",
                 type="string", help="Suggested experiment name")
-
-class fedd_create_opts(fedd_new_opts):
-    def __init__(self):
-        fedd_new_opts.__init__(self)
+        self.add_option("--label", action="store", dest="label",
+                type="string", help="Label for output")
+	# Access has been busted for a while.
+        #if add_node_callback:
+        #    self.add_option("--node", action="callback", type="string", 
+        #            callback=add_node_callback, callback_args=(node_descs,),
+        #            help="Node description: image:hardware[:count]")
+        self.add_option("--testbed", action="store", dest="testbed",
+                type="string",
+                help="Testbed identifier (URI) to contact (required)")
         self.add_option("--file", dest="file", 
                 help="experiment description file")
@@ -104,31 +111,15 @@
 		help="Service description name:exporters:importers:attrs")
 
-class fedd_split_opts(fedd_create_opts):
-    def __init__(self ):
-        fedd_create_opts.__init__(self)
-        self.add_option('--fedkit', action='store_true', dest='fedkit',
-                default=False,
-                help="get output suitable for federation kit install")
-        self.add_option('--gatewaykit', action='store_true',
-                dest='gatewaykit', default=False,
-                help="get output suitable for federation gateway kit install")
-
-
-class fedd_access_opts(fedd_create_opts):
-    def __init__(self):
-        fedd_create_opts.__init__(self)
-        self.add_option("--label", action="store", dest="label",
-                type="string", help="Label for output")
-        if add_node_callback:
-            self.add_option("--node", action="callback", type="string", 
-                    callback=add_node_callback, callback_args=(node_descs,),
-                    help="Node description: image:hardware[:count]")
-        self.add_option("--testbed", action="store", dest="testbed",
-                type="string",
-                help="Testbed identifier (URI) to contact (required)")
-
-class fedd_exp_data_opts(fedd_client_opts):
+class fedd_terminate_opts(fedd_client_opts):
     def __init__(self):
         fedd_client_opts.__init__(self)
+        self.add_option("--force", dest="force",
+                action="store_true", default=False,
+                help="Force termination if experiment is in strange state")
+        self.add_option("--logfile", dest="logfile", default=None,
+                help="File to write log to")
+        self.add_option("--print_log", dest="print_log", default=False,
+                action="store_true",
+                help="Print deallocation log to standard output")
         self.add_option("--experiment_cert", dest="exp_certfile",
                 type="string", help="experiment certificate file")
@@ -141,78 +132,4 @@
                 help="data to extract")
 
-class fedd_terminate_opts(fedd_exp_data_opts):
-    def __init__(self):
-        fedd_exp_data_opts.__init__(self)
-        self.add_option("--force", dest="force",
-                action="store_true", default=False,
-                help="Force termination if experiment is in strange state")
-        self.add_option("--logfile", dest="logfile", default=None,
-                help="File to write log to")
-        self.add_option("--print_log", dest="print_log", default=False,
-                action="store_true",
-                help="Print deallocation log to standard output")
-
-class fedd_multi_exp_data_opts(fedd_client_opts):
-    def __init__(self):
-        fedd_client_opts.__init__(self)
-        self.add_option("--data", dest="data", default=[],
-                action="append", type="choice",
-                choices=("id", "federant", "vtopo", "vis", "log", "status"),
-                help="data to extract")
-
-class fedd_spew_opts(fedd_client_opts):
-    def __init__(self):
-        fedd_client_opts.__init__(self)
-        self.add_option("--experiment_cert", dest="exp_certfile",
-                type="string", help="experiment name certificate file")
-        self.add_option("--experiment_name", dest="exp_name",
-                type="string", help="human readable experiment name")
-        self.add_option("--logfile", dest="logfile", default=None,
-                help="File to write log to")
-        self.add_option('--update_time', dest='update', type='int', default=10,
-                help='how often to update the printed log')
-
-class fedd_image_opts(fedd_exp_data_opts):
-    def __init__(self):
-        fedd_exp_data_opts.__init__(self)
-        self.add_option("--output", dest="outfile", type="string",
-                help="output image file")
-        self.add_option("--format", dest="format", type="choice", 
-                choices=("jpg", "png", "dot", "svg"),
-                help="Output file format override")
-        self.add_option("--program", dest="neato", default=None,
-                type="string",
-                help="Program compatible with dot (from graphviz) used to " + \
-                        "render image")
-        self.add_option("--labels", dest='labels', action='store_true',
-                default=True, help='Label nodes and edges')
-        self.add_option("--no_labels", dest='labels',
-                default=True, action='store_false',
-                help='Label nodes and edges')
-        self.add_option('--pixels', dest="pixels", default=None,
-                type="int",
-                help="Size of output in pixels (diagrams are square")
-
-class fedd_ns_image_opts(fedd_split_opts):
-    def __init__(self):
-        fedd_split_opts.__init__(self)
-        self.add_option("--output", dest="outfile", type="string",
-                help="output image file")
-        self.add_option("--format", dest="format", type="choice", 
-                choices=("jpg", "png", "dot", "svg"),
-                help="Output file format override")
-        self.add_option("--program", dest="neato", default=None,
-                type="string",
-                help="Program compatible with dot (from graphviz) used to " + \
-                        "render image")
-        self.add_option("--labels", dest='labels', action='store_true',
-                default=True, help='Label nodes and edges')
-        self.add_option("--no_labels", dest='labels',
-                default=True, action='store_false',
-                help='Label nodes and edges')
-        self.add_option('--pixels', dest="pixels", default=None,
-                type="int",
-                help="Size of output in pixels (diagrams are square")
-
 class fedd_start_opts(fedd_client_opts):
     def __init__(self):
@@ -221,11 +138,4 @@
                 help="experiment description file")
 
-class fedd_ns_topdl_opts(fedd_client_opts):
-    def __init__(self):
-        fedd_client_opts.__init__(self)
-        self.add_option("--file", dest="file", 
-                help="experiment description file")
-        self.add_option("--output", dest="outfile", type="string",
-                help="output topdl file")
 
 def exit_with_fault(dict, out=sys.stderr):
@@ -247,4 +157,5 @@
     print>>out, "Description: %s" % dict['desc']
     sys.exit(dict.get('code', 20))
+
 # Base class for the various client operations.  It includes some commonly used
 # functions and classes the most important of which are the exception classes
@@ -362,853 +273,4 @@
             raise RuntimeError("No body in response??")
 
-class exp_data_base(fedd_rpc):
-    def __init__(self):
-        """
-        Init the various conversions
-        """
-
-        fedd_rpc.__init__(self)
-        # List of things one could ask for and what formatting routine is
-        # called.
-        self.params = {
-                'vis': ('vis', self.print_vis_or_vtopo('vis')),
-                'vtopo': ('vtopo', self.print_vis_or_vtopo('vtopo')),
-                'federant': ('federant', self.print_xml),
-                'experimentdescription': \
-			('experimentdescription', self.print_xml),
-                'id': ('experimentID', self.print_id),
-                'status': ('experimentStatus', self.print_string),
-                'log': ('allocationLog', self.print_string),
-                'access': ('experimentAccess', self.print_string),
-            }
-
-    # Utility functions
-    def print_string(self, d, out=sys.stdout):
-        print >>out, d
-
-    def print_id(self, d, out=sys.stdout):
-        if d:
-            for id in d:
-                for k in id.keys():
-                    print >>out, "%s: %s" % (k, id[k])
-
-    def print_xml(self, d, out=sys.stdout):
-	"""
-	Very simple ugly xml formatter of the kinds of dicts that come back
-	from services.
-	"""
-	if isinstance(d, dict):
-	    for k, v in d.items():
-		print >>out, "<%s>" % k
-		self.print_xml(v, out)
-		print >>out, "</%s>" % k
-	elif isinstance(d, list):
-	    for x in d:
-		self.print_xml(x, out)
-	else:
-	    print >>out, d
-
-
-    class print_vis_or_vtopo:
-        """
-        Print the retrieved data is a simple xml representation of the dict.
-        """
-        def __init__(self, top):
-            self.xml = top
-
-        def __call__(self, d, out=sys.stdout):
-            str = "<%s>\n" % self.xml
-            for t in ('node', 'lan'):
-                if d.has_key(t): 
-                    for x in d[t]:
-                        str += "<%s>" % t
-                        for k in x.keys():
-                            str += "<%s>%s</%s>" % (k, x[k],k)
-                        str += "</%s>\n" % t
-            str+= "</%s>" % self.xml
-            print >>out, str
-
-        
-    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:
-            if ( not os.access(opts.trusted, os.R_OK) ) :
-                sys.exit("Cannot read trusted certificates (%s)" % opts.trusted)
-
-        if opts.debug > 0: opts.tracefile=sys.stderr
-
-        (user, cert) = self.get_user_info()
-
-        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");
-
-        exp_id = None
-        if opts.exp_certfile:
-            exp_id = { 'fedid': fedid(file=opts.exp_certfile) }
-
-        if opts.exp_name:
-            exp_id = { 'localname' : opts.exp_name }
-
-        if not exp_id:
-            sys.exit("specify one of --experiment_cert and --experiment_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,
-		    caller=self.caller('Info'))
-        except self.RPCException, e:
-            exit_with_fault(\
-                    {'desc': e.desc, 'errstr': e.errstr, 'code': e.code})
-        except RuntimeError, e:
-            sys.exit("Error processing RPC: %s" % e)
-
-	return (resp_dict, opts)
-
-
-# Querying experiment data follows the same control flow regardless of the
-# specific data retrieved.  This class encapsulates that control flow.
-class exp_data(exp_data_base):
-    def __init__(self): 
-        exp_data_base.__init__(self)
-
-    def __call__(self):
-        """
-        The control flow.  Compose the request and print the response.
-        """
-
-	resp_dict, opts = exp_data_base.__call__(self)
-
-        for d in opts.data:
-            key, output = self.params[d]
-            try:
-                if resp_dict.has_key(key):
-                    output(resp_dict[key])
-            except RuntimeError, e:
-                sys.exit("Bad response. %s" % e.message)
-
-class ftopo(exp_data_base):
-    """
-    ftopo returns the mapping from logical name to local hostname
-    """
-    def __init__(self):
-        exp_data_base.__init__(self)
-    def __call__(self):
-        sys.argv.append('--data=experimentdescription')
-        resp, opts = exp_data_base.__call__(self)
-	if 'experimentdescription' in resp and \
-		'topdldescription' in resp['experimentdescription']:
-	    top = \
-		topdl.Topology(\
-		**resp['experimentdescription']['topdldescription'])
-
-	    for e in [ e for e in top.elements \
-		    if isinstance(e, topdl.Computer)]:
-		hn = e.get_attribute('hostname')
-		tb = e.get_attribute('testbed')
-		if hn and tb:
-		    print ":".join([",".join(e.name), hn, tb])
-
-
-
-
-class vtopo(exp_data_base):
-    """
-    vtopo is just an info --data=vtopo request, so this adds that parameter to
-    the arguments and executes exp_info when called.
-    """
-    def __init__(self):
-        exp_data_base.__init__(self)
-    def __call__(self):
-        sys.argv.append('--data=vtopo')
-        resp, opts = exp_data_base.__call__(self)
-	if 'vtopo' in resp:
-	    self.print_vis_or_vtopo('vtopo')(resp['vtopo'])
-
-
-class vis(exp_data_base):
-    """
-    vis is just an info --data=vis request, so this adds that parameter to
-    the arguments and executes exp_info when called.
-    """
-    def __init__(self):
-        exp_data_base.__init__(self)
-    def __call__(self):
-        sys.argv.append('--data=vis')
-        resp, opts = exp_data_base.__call__(self)
-	if 'vis' in resp:
-	    self.print_vis_or_vtopo('vis')(resp['vis'])
-
-class status(exp_data_base):
-    """
-    status is just an info --data=status request, so this adds that parameter
-    to the arguments and executes exp_info when called.
-    """
-    def __init__(self):
-        exp_data_base.__init__(self)
-    def __call__(self):
-        sys.argv.append('--data=status')
-        resp, opts = exp_data_base.__call__(self)
-	if 'experimentStatus' in resp:
-	    self.print_string(resp['experimentStatus'])
-
-class multi_exp_data(exp_data_base):
-    def __init__(self): 
-        exp_data_base.__init__(self)
-
-
-    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_multi_exp_data_opts()
-
-        (opts, args) = parser.parse_args()
-
-        if opts.trusted:
-            if ( not os.access(opts.trusted, os.R_OK) ) :
-                sys.exit("Cannot read trusted certificates (%s)" % opts.trusted)
-
-        if opts.debug > 0: opts.tracefile=sys.stderr
-
-        (user, cert) = self.get_user_info()
-
-        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)
-
-        req = { }
-
-        try:
-            resp_dict = self.do_rpc(req,
-                    opts.url, opts.transport, cert, opts.trusted, 
-                    serialize_only=opts.serialize_only,
-                    tracefile=opts.tracefile,
-		    caller=self.caller('MultiInfo'))
-        except self.RPCException, e:
-            exit_with_fault(\
-                    {'desc': e.desc, 'errstr': e.errstr, 'code': e.code})
-        except RuntimeError, e:
-            sys.exit("Error processing RPC: %s" % e)
-
-        exps = resp_dict.get('info', [])
-        if exps:
-            print '---'
-            for exp in exps:
-                for d in opts.data:
-                    key, output = self.params[d]
-                    try:
-                        if exp.has_key(key):
-                            output(exp[key])
-                    except RuntimeError, e:
-                        sys.exit("Bad response. %s" % e.message)
-                print '---'
-
-
-class multi_status(exp_data_base):
-    def __init__(self): 
-        exp_data_base.__init__(self)
-
-
-    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_client_opts()
-
-        (opts, args) = parser.parse_args()
-
-        if opts.trusted:
-            if ( not os.access(opts.trusted, os.R_OK) ) :
-                sys.exit("Cannot read trusted certificates (%s)" % opts.trusted)
-
-        if opts.debug > 0: opts.tracefile=sys.stderr
-
-        (user, cert) = self.get_user_info()
-
-        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)
-
-        req = { }
-
-        try:
-            resp_dict = self.do_rpc(req,
-                    opts.url, opts.transport, cert, opts.trusted, 
-                    serialize_only=opts.serialize_only,
-                    tracefile=opts.tracefile,
-		    caller=self.caller('MultiInfo'))
-        except self.RPCException, e:
-            exit_with_fault(\
-                    {'desc': e.desc, 'errstr': e.errstr, 'code': e.code})
-        except RuntimeError, e:
-            sys.exit("Error processing RPC: %s" % e)
-
-        for exp in resp_dict.get('info', []):
-            out = []
-            for eid in exp.get('experimentID', []):
-                if eid.has_key('localname'):
-                    out.append(eid['localname'])
-                    break
-            else:
-                out.append("")
-            for eid in exp.get('experimentID', []):
-                if eid.has_key('fedid'):
-                    out.append("%s" % eid['fedid'])
-                    break
-            else:
-                out.append("")
-
-            out.append(exp.get('experimentStatus', ""))
-
-            for f in exp.get('federant', []):
-                if f.get('master', False):
-                    em = f.get('emulab', None)
-                    if em:
-                        project = em.get('project', None)
-                        if project:
-                            tb = project.get('testbed', None)
-                            if tb and tb.has_key('localname'):
-                                out.append(tb['localname'])
-                            else:
-                                out.append("")
-                            pn = project.get('name', None)
-                            if pn and pn.has_key('localname'):
-                                out.append(pn['localname'])
-                            else:
-                                out.append("")
-                        else:
-                            out.extend(("", ""))
-                    else:
-                        out.extend(("", ""))
-                    break
-            else:
-                out.extend(("",""))
-
-            print ":".join(out)
-
-class image(fedd_rpc):
-    def __init__(self): 
-        """
-        Null constructor
-        """
-
-        fedd_rpc.__init__(self)
-
-    @staticmethod
-    def gen_dot_topo(d, labels, dotfile):
-        lans = { }
-        links = { }
-
-        for n in d.get('node', []):
-            print >>dotfile, '\t"%s" [shape=box,style=filled,\\' % n['vname']
-            print >>dotfile, '\t\tcolor=black,fillcolor="#60f8c0",regular=1]'
-
-        # Collect lan members (we have to draw extra stuff for these)
-        for n in d.get('lan', []):
-            v = n['vname']
-            m = n['member']
-            i = n['ip']
-            if m.find(':') != -1:
-                m = m[0:m.find(':')]
-            if lans.has_key(v):
-                lans[v].append((m, i))
-            elif links.has_key(v):
-                links[v].append((m, i))
-                if len(links[v]) > 2:
-                    lans[v] = links[v]
-                    del links[v]
-            else:
-                links[v] = [(m, i)]
-
-        # Encode the lans and the links
-        for l in lans.keys():
-            print >>dotfile, '\t"%s" [shape=ellipse, style=filled,\\' % l
-            print >>dotfile,'\t\tcolor=black,fillcolor="#80c0f8",regular=1]'
-            for n in lans[l]:
-                if labels:
-                    print >>dotfile, '\t"%s" -- "%s" [headlabel="%s"]' % \
-                            (l, n[0], n[1])
-                else:
-                    print >>dotfile, '\t"%s" -- "%s"' % (l, n[0])
-
-        for k, l in links.items():
-            if len(l) == 2:
-                if labels:
-                    print >>dotfile, \
-                            ('\t"%s" -- "%s" [label="%s",taillabel="%s",' + \
-                            'headlabel="%s"]') % \
-                            (l[0][0], l[1][0], k, l[0][1], l[1][1])
-                else:
-                    print >>dotfile, '\t"%s" -- "%s" ' % (l[0][0], l[1][0])
-
-
-    def gen_image(self, d, nodes, file, fmt, neato, labels, pix=None):
-
-        # Open up a temporary file for dot to turn into a visualization
-        try:
-            df, dotname = tempfile.mkstemp(prefix='fedd_client', suffix=".dot")
-            dotfile = os.fdopen(df, 'w')
-        except IOError:
-            raise service_error(service_error.internal,
-                    "Failed to open file in genviz")
-
-        if not neato:
-            for f in ['/usr/bin/neato', '/usr/local/bin/neato', 
-                    '/usr/bin/dot', '/usr/local/bin/dot']:
-                if os.access(f, os.X_OK):
-                    neato = f
-                    break
-            else:
-                sys.exit("Cannot find graph rendering program")
-
-        cmd = [neato, '-Gsplines=true']
-        if fmt != 'dot': cmd.append('-T%s' % fmt)
-        if file:
-            cmd.append('-o')
-            cmd.append(file)
-        cmd.append(dotname)
-
-        #nodes = d.get('node',[])
-
-        if nodes < 10: size = 5
-        elif nodes < 50: size = 10
-        else: size = 18
-
-        if pix:
-            dpi = pix / size
-        else:
-            dpi = None
-
-
-        print >>dotfile, "graph G {"
-        if dpi:
-            print >>dotfile, '\tgraph [size="%i,%i", dpi="%i", ratio=fill];' \
-                    % (size, size, dpi)
-        else:
-            print >>dotfile, '\tgraph [size="%i,%i", ratio=fill];' \
-                    % (size, size)
-
-        if labels:
-            print >>dotfile, '\tnode [fontname=arial,fontsize=9,label="\N"];'
-            print >>dotfile, '\tedge [fontname=arial,fontsize=9];\n'
-        else:
-            print >>dotfile, '\tnode [label=""];'
-
-
-        self.gen_dot_topo(d, labels, dotfile)
-        print >>dotfile, "}"
-        dotfile.close()
-
-        # Redirect the drawing program stderr
-        dev_null = open("/dev/null", "w")
-        rv = subprocess.call(cmd, stderr=dev_null)
-        os.remove(dotname)
-        dev_null.close()
-        if rv != 0:
-            sys.exit("Error creating graph")
-
-
-
-    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_image_opts()
-
-        (opts, args) = parser.parse_args()
-
-        if opts.trusted:
-            if ( not os.access(opts.trusted, os.R_OK) ) :
-                sys.exit("Cannot read trusted certificates (%s)" % opts.trusted)
-
-        if opts.debug > 0: opts.tracefile=sys.stderr
-
-        (user, cert) = self.get_user_info()
-
-        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 }
-
-        if opts.format and opts.outfile:
-            fmt = opts.format
-            file = opts.outfile
-        elif not opts.format and opts.outfile:
-            fmt = opts.outfile[-3:]
-            if fmt not in ("png", "jpg", "dot", "svg"):
-                sys.exit("Unexpected file type and no format specified")
-            file = opts.outfile
-        elif opts.format and not opts.outfile:
-            fmt = opts.format
-            file = None
-        else:
-            fmt="dot"
-            file = None
-
-
-        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,
-		    caller=self.caller('Vtopo'))
-        except self.RPCException, e:
-            exit_with_fault(\
-                    {'desc': e.desc, 'errstr': e.errstr, 'code': e.code})
-        except RuntimeError, e:
-            sys.exit("Error processing RPC: %s" % e)
-
-
-        if resp_dict.has_key('vtopo'):
-            self.gen_image(resp_dict['vtopo'], 
-                    len(resp_dict['vtopo'].get('node', [])),
-                    file, fmt, opts.neato, opts.labels, opts.pixels)
-	elif opts.serialze_only:
-	    sys.exit(0)
-        else:
-            sys.exit("Bad response. %s" % e.message)
-
-class topdl_image(image):
-    def __init__(self): 
-        """
-        Null constructor
-        """
-
-        image.__init__(self)
-
-    @staticmethod
-    def gen_dot_topo(t, labels, dotfile):
-        lans = [ s for s in t.substrates if len(s.interfaces) != 2]
-        links = [ s for s in t.substrates if len(s.interfaces) == 2]
-
-        i = 0
-        for n in t.elements:
-            if n.name:
-                print >>dotfile, '\t"%s" [shape=box,style=filled,\\' % n.name
-            else:
-                print >>dotfile, \
-                        '\t"unnamed_node%d" [shape=box,style=filled,\\' % i
-                i += 1
-            print >>dotfile, '\t\tcolor=black,fillcolor="#60f8c0",regular=1]'
-
-        # Encode the lans and the links
-        for l in lans:
-            print >>dotfile, '\t"%s" [shape=ellipse, style=filled,\\' % l.name
-            print >>dotfile,'\t\tcolor=black,fillcolor="#80c0f8",regular=1]'
-            for i in l.interfaces:
-                ip = i.get_attribute('ip4_address')
-                if labels and ip:
-                    print >>dotfile, '\t"%s" -- "%s" [headlabel="%s"]' % \
-                            (l.name, i.element.name, ip)
-                else:
-                    print >>dotfile, '\t"%s" -- "%s"' % \
-                            (l.name, i.element.name)
-
-        for l in links:
-            s, d = l.interfaces[0:2] 
-            sip = s.get_attribute('ip4_address')
-            dip = d.get_attribute('ip4_address')
-            if labels and sip and dip:
-                print >>dotfile, \
-                        ('\t"%s" -- "%s" [label="%s",taillabel="%s",' + \
-                        'headlabel="%s"]') % \
-                        (s.element.name, d.element.name, l.name,
-                            sip, dip)
-            else:
-                print >>dotfile, '\t"%s" -- "%s" ' % \
-                        (s.element.name, d.element.name)
-    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_ns_image_opts()
-
-        (opts, args) = parser.parse_args()
-
-        if opts.trusted:
-            if ( not os.access(opts.trusted, os.R_OK) ) :
-                sys.exit("Cannot read trusted certificates (%s)" % opts.trusted)
-
-        if opts.debug > 0: opts.tracefile=sys.stderr
-
-        (user, cert) = self.get_user_info()
-
-        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.file:
-            exp_desc = ""
-            try:
-                top = topdl.topology_from_xml(filename=opts.file, 
-                        top="experiment")
-            except IOError:
-                sys.exit("Cannot read description file (%s)" % opts.file)
-        else:
-            sys.exit("Must specify an experiment description (--file)")
-
-        if not opts.master:
-            opts.master="dummy"
-
-
-        if opts.format and opts.outfile:
-            fmt = opts.format
-            file = opts.outfile
-        elif not opts.format and opts.outfile:
-            fmt = opts.outfile[-3:]
-            if fmt not in ("png", "jpg", "dot", "svg"):
-                sys.exit("Unexpected file type and no format specified")
-            file = opts.outfile
-        elif opts.format and not opts.outfile:
-            fmt = opts.format
-            file = None
-        else:
-            fmt="dot"
-            file = None
-
-        self.gen_image(top, len(top.elements), file, fmt, opts.neato, 
-                opts.labels, opts.pixels)
-
-class ns_image(topdl_image):
-    def __init__(self): 
-        """
-        Null constructor
-        """
-
-        topdl_image.__init__(self)
-
-    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_ns_image_opts()
-
-        (opts, args) = parser.parse_args()
-
-        if opts.trusted:
-            if ( not os.access(opts.trusted, os.R_OK) ) :
-                sys.exit("Cannot read trusted certificates (%s)" % opts.trusted)
-
-        if opts.debug > 0: opts.tracefile=sys.stderr
-
-        (user, cert) = self.get_user_info()
-
-        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.file:
-            exp_desc = ""
-            try:
-                f = open(opts.file, 'r')
-                for line in f:
-                    exp_desc += line
-                f.close()
-            except IOError:
-                sys.exit("Cannot read description file (%s)" %opts.file)
-        else:
-            sys.exit("Must specify an experiment description (--file)")
-
-        if not opts.master:
-            opts.master="dummy"
-
-        req = { 'description': { 'ns2description': exp_desc }, }
-
-        if opts.format and opts.outfile:
-            fmt = opts.format
-            file = opts.outfile
-        elif not opts.format and opts.outfile:
-            fmt = opts.outfile[-3:]
-            if fmt not in ("png", "jpg", "dot", "svg"):
-                sys.exit("Unexpected file type and no format specified")
-            file = opts.outfile
-        elif opts.format and not opts.outfile:
-            fmt = opts.format
-            file = None
-        else:
-            fmt="dot"
-            file = None
-
-        try:
-            resp_dict = self.do_rpc(req,
-                    opts.url, opts.transport, cert, opts.trusted, 
-                    serialize_only=opts.serialize_only,
-                    tracefile=opts.tracefile,
-		    caller=self.caller('Ns2Topdl'))
-        except self.RPCException, e:
-            exit_with_fault(\
-                    {'desc': e.desc, 'errstr': e.errstr, 'code': e.code})
-        except RuntimeError, e:
-            sys.exit("Error processing RPC: %s" % e)
-
-
-        if 'experimentdescription' in resp_dict:
-	    if 'topdldescription' in resp_dict['experimentdescription']:
-		exp = resp_dict['experimentdescription']['topdldescription']
-		top = topdl.Topology(**exp)
-		self.gen_image(top, len(top.elements), file, fmt, opts.neato, 
-			opts.labels, opts.pixels)
-	    else:
-                sys.exit("Bad response: could not translate")
-	elif opts.serialze_only:
-	    sys.exit(0)
-        else:
-            sys.exit("Bad response. %s" % e.message)
-
-class terminate(fedd_rpc):
-    def __init__(self): 
-        """
-        Termination request
-        """
-
-        fedd_rpc.__init__(self)
-
-    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_terminate_opts()
-
-        (opts, args) = parser.parse_args()
-
-        (user, cert) = self.get_user_info()
-        if opts.trusted:
-            if ( not os.access(opts.trusted, os.R_OK) ) :
-                sys.exit("Cannot read trusted certificates (%s)" % opts.trusted)
-
-        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.print_log and opts.logfile:
-            sys.exit("Only one of --logfile and --print_log is permitted")
-        elif opts.print_log:
-            out = sys.stdout
-        elif opts.logfile:
-            try:
-                out = open(opts.logfile, "w")
-            except IOError,e:
-                sys.exit("Cannot open logfile: %s" %e)
-        else:
-            out = None
-
-        exp_id = None
-
-        if opts.exp_certfile:
-            exp_id = { 'fedid': fedid(file=opts.exp_certfile) }
-
-        if opts.exp_name:
-            exp_id = { 'localname' : opts.exp_name }
-
-        if not exp_id:
-            sys.exit("Must give one of --experiment_cert and " +\
-                    "--experiment_name");
-
-        req = { 'experiment': exp_id, 'force': opts.force }
-
-        try:
-            resp_dict = self.do_rpc(req,
-                    opts.url, opts.transport, cert, opts.trusted, 
-                    serialize_only=opts.serialize_only,
-                    tracefile=opts.tracefile,
-		    caller=self.caller('Terminate'))
-        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)
-
-        if out:
-            log = resp_dict.get('deallocationLog', None)
-            if log:
-                print >>out, log
-                out.close()
-            else:
-                out.close()
-                sys.exit("No log returned")
-
 class terminate_segment(fedd_rpc):
     def __init__(self): 
@@ -1297,312 +359,4 @@
                 sys.exit("No log returned")
 
-class new(fedd_rpc):
-    def __init__(self): 
-        fedd_rpc.__init__(self)
-    def __call__(self):
-        # Process the options using the customized option parser defined above
-        parser = fedd_new_opts()
-
-        (opts, args) = parser.parse_args()
-
-        if opts.trusted:
-            if ( not os.access(opts.trusted, os.R_OK) ) :
-                sys.exit("Cannot read trusted certificates (%s)" % opts.trusted)
-
-        if opts.debug > 0: opts.tracefile=sys.stderr
-
-        (user, cert) = self.get_user_info()
-
-        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)
-
-        out_certfile = opts.out_certfile
-
-        msg = { }
-
-        if opts.exp_name:
-            msg['experimentID'] = { 'localname': opts.exp_name }
-
-        if opts.debug > 1: print >>sys.stderr, msg
-
-        try:
-            resp_dict = self.do_rpc(msg, 
-                    opts.url, opts.transport, cert, opts.trusted, 
-                    serialize_only=opts.serialize_only,
-                    tracefile=opts.tracefile, 
-		    caller=self.caller("New"))
-        except self.RPCException, e:
-            exit_with_fault(\
-                    {'desc': e.desc, 'errstr': e.errstr, 'code': e.code})
-        except RuntimeError, e:
-            sys.exit("Error processing RPC: %s" % e)
-
-        if opts.debug > 1: print >>sys.stderr, resp_dict
-
-        ea = resp_dict.get('experimentAccess', None)
-        if out_certfile and ea and ea.has_key('X509'):
-            try:
-                f = open(out_certfile, "w")
-                print >>f, ea['X509']
-                f.close()
-            except IOError:
-                sys.exit('Could not write to %s' %  out_certfile)
-        eid = resp_dict.get('experimentID', None)
-        if eid:
-            for id in eid:
-                for k in id.keys():
-                    print "%s: %s" % (k, id[k])
-        st = resp_dict.get('experimentStatus', None)
-        if st:
-            print "status: %s" % st
-
-
-class create(fedd_rpc):
-    def __init__(self): 
-	fedd_rpc.__init__(self)
-
-    @staticmethod
-    def parse_service(svc):
-	terms = svc.split(':')
-	svcd = { }
-	if len(terms) < 2 or len(terms[0]) == 0 or len(terms[1]) == 0:
-	    sys.exit("Bad service description '%s': Not enough terms" % svc)
-	
-	svcd['name'] = terms[0]
-	svcd['export'] = terms[1].split(",")
-	if len(terms) > 2 and len(terms[2]) > 0:
-	    svcd['import'] = terms[2].split(",")
-	if len(terms) > 3 and len(terms[3]) > 0:
-	    svcd['fedAttr'] = [ ]
-	    for t in terms[3].split(","):
-		i = t.find("=")
-		if i != -1 :
-		    svcd['fedAttr'].append(
-			    {'attribute': t[0:i], 'value': t[i+1:]})
-		else:
-		    sys.exit("Bad service attribute '%s': no equals sign" % t)
-	return svcd
-
-    def __call__(self):
-        parser = fedd_create_opts()
-
-        (opts, args) = parser.parse_args()
-
-	svcs = []
-
-        if opts.trusted:
-            if ( not os.access(opts.trusted, os.R_OK) ) :
-                sys.exit("Cannot read trusted certificates (%s)" % opts.trusted)
-
-	if not (opts.project and opts.master) and not opts.service:
-	    print >>sys.stderr, "Neither master/project nor services requested"
-
-        if opts.debug > 0: opts.tracefile=sys.stderr
-
-        (user, cert) = self.get_user_info()
-
-        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.file:
-            exp_desc = ""
-            try:
-                f = open(opts.file, 'r')
-                for line in f:
-                    exp_desc += line
-                f.close()
-            except IOError:
-                sys.exit("Cannot read description file (%s)" %opts.file)
-        else:
-            sys.exit("Must specify an experiment description (--file)")
-
-        out_certfile = opts.out_certfile
-	
-	# Fill in svcs here so errors in service specification come before the
-	# New call is made
-	if opts.master and opts.project:
-	    svcs.append({
-		    'name': 'project_export', 
-		    'export': [opts.master], 
-		    'importall': True,
-		    'fedAttr': [ 
-			{ 'attribute': 'project', 'value': opts.project },
-			],
-		    })
-
-	svcs.extend([ self.parse_service(s) for s in opts.service])
-        msg = { }
-
-        if opts.exp_name:
-            msg['experimentID'] = { 'localname': opts.exp_name }
-
-        if opts.debug > 1: print >>sys.stderr, msg
-
-        try:
-            resp_dict = self.do_rpc(msg, 
-                    opts.url, opts.transport, cert, opts.trusted, 
-                    serialize_only=opts.serialize_only,
-                    tracefile=opts.tracefile,
-		    caller=self.caller('New'))
-        except self.RPCException, e:
-            exit_with_fault(\
-                    {'desc': e.desc, 'errstr': e.errstr, 'code': e.code})
-        except RuntimeError, e:
-            sys.exit("Error processing RPC: %s" % e)
-
-        if opts.debug > 1: print >>sys.stderr, resp_dict
-
-        ea = resp_dict.get('experimentAccess', None)
-        if out_certfile and ea and ea.has_key('X509'):
-            try:
-                f = open(out_certfile, "w")
-                print >>f, ea['X509']
-                f.close()
-            except IOError:
-                sys.exit('Could not write to %s' %  out_certfile)
-        eid = resp_dict.get('experimentID', None)
-	e_fedid = None
-	e_local = None
-        if eid:
-            for id in eid:
-                for k in id.keys():
-		    if k =='fedid':
-			e_fedid = id[k]
-		    elif k =='localname':
-			e_local = id[k]
-	elif opts.serialize_only:
-	    e_local = "serialize"
-        msg = { 'experimentdescription': { 'ns2description': exp_desc }, }
-
-	if svcs:
-	    msg['service'] = svcs
-
-	if e_fedid:
-	    msg['experimentID'] = { 'fedid': e_fedid }
-	elif e_local:
-	    msg['experimentID'] = { 'localname': e_local }
-	else:
-	    sys.exit("New did not return an experiment ID??")
-
-        if opts.debug > 1: print >>sys.stderr, msg
-
-        try:
-            resp_dict = self.do_rpc(msg, 
-                    opts.url, opts.transport, cert, opts.trusted, 
-                    serialize_only=opts.serialize_only,
-                    tracefile=opts.tracefile,
-		    caller=self.caller('Create'))
-        except self.RPCException, e:
-            exit_with_fault(\
-                    {'desc': e.desc, 'errstr': e.errstr, 'code': e.code})
-        except RuntimeError, e:
-            sys.exit("Error processing RPC: %s" % e)
-
-        if opts.debug > 1: print >>sys.stderr, resp_dict
-
-        ea = resp_dict.get('experimentAccess', None)
-        if out_certfile and ea and ea.has_key('X509'):
-            try:
-                f = open(out_certfile, "w")
-                print >>f, ea['X509']
-                f.close()
-            except IOError:
-                sys.exit('Could not write to %s' %  out_certfile)
-        eid = resp_dict.get('experimentID', None)
-        if eid:
-            for id in eid:
-                for k in id.keys():
-                    print "%s: %s" % (k, id[k])
-        st = resp_dict.get('experimentStatus', None)
-        if st:
-            print "status: %s" % st
-
-class split(fedd_rpc):
-    def __init__(self): 
-        fedd_rpc.__init__(self)
-    def __call__(self):
-        # Process the options using the customized option parser defined above
-        parser = fedd_split_opts()
-
-        (opts, args) = parser.parse_args()
-
-        if opts.trusted:
-            if ( not os.access(opts.trusted, os.R_OK) ) :
-                sys.exit("Cannot read trusted certificates (%s)" % opts.trusted)
-
-        if opts.debug > 0: opts.tracefile=sys.stderr
-
-        (user, cert) = self.get_user_info()
-
-        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.file:
-            exp_desc = ""
-            try:
-                f = open(opts.file, 'r')
-                for line in f:
-                    exp_desc += line
-                f.close()
-            except IOError:
-                sys.exit("Cannot read description file (%s)" %opts.file)
-        else:
-            sys.exit("Must specify an experiment description (--file)")
-
-        if not opts.master:
-            sys.exit("Must specify a master testbed (--master)")
-
-        out_certfile = opts.out_certfile
-
-        msg = {
-                'description': { 'ns2description': exp_desc },
-                'master': opts.master,
-                'include_fedkit': opts.fedkit,
-                'include_gatewaykit': opts.gatewaykit,
-                }
-
-        if opts.debug > 1: print >>sys.stderr, msg
-
-        try:
-            resp_dict = self.do_rpc(msg, 
-                    opts.url, opts.transport, cert, opts.trusted, 
-                    serialize_only=opts.serialize_only,
-                    tracefile=opts.tracefile,
-		    caller=self.caller('Ns2Split'))
-        except self.RPCException, e:
-            exit_with_fault(\
-                    {'desc': e.desc, 'errstr': e.errstr, 'code': e.code})
-        except RuntimeError, e:
-            sys.exit("Error processing RPC: %s" % e)
-
-        if opts.debug > 1: print >>sys.stderr, resp_dict
-
-	ed = resp_dict.get('experimentdescription', None)
-	if ed:
-	    if ed.has_key('topdldescription'):
-		topo = topdl.Topology(**ed['topdldescription'])
-		print topdl.topology_to_xml(topo, 'experiment')
-
 class access(fedd_rpc):
     def __init__(self):
@@ -1699,97 +453,4 @@
 	    self.print_response_as_testbed(resp_dict, opts.label)
 
-# Keep requesting experiment status and printing updates to the log until the
-# experiment is done being created.
-class spew_log(fedd_rpc):
-    def __init__(self): 
-        """
-        Init the superclass
-        """
-
-        fedd_rpc.__init__(self)
-
-    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_spew_opts()
-
-        (opts, args) = parser.parse_args()
-
-        if opts.trusted:
-            if ( not os.access(opts.trusted, os.R_OK) ) :
-                sys.exit("Cannot read trusted certificates (%s)" % opts.trusted)
-
-        if opts.debug > 0: opts.tracefile=sys.stderr
-
-        (user, cert) = self.get_user_info()
-
-        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 }
-
-        if opts.logfile:
-            try:
-                out = open(opts.logfile, "w")
-            except IOError,e:
-                sys.exit("Cannot open logfile: %s" %e)
-        else:
-            out = sys.stdout
-
-        req = { 'experiment': exp_id }
-
-        status = "starting"
-        log = ""
-        log_offset = 0
-        update = opts.update
-        while status == 'starting':
-            try:
-                resp_dict = self.do_rpc(req,
-                        opts.url, opts.transport, cert, opts.trusted, 
-                        serialize_only=opts.serialize_only,
-                        tracefile=opts.tracefile,
-			caller=self.caller('Info'))
-            except self.RPCException, e:
-                exit_with_fault(\
-                        {'desc': e.desc, 'errstr': e.errstr, 'code': e.code})
-            except RuntimeError, e:
-                sys.exit("Error processing RPC: %s" % e)
-
-	    if not opts.serialize_only:
-		status = resp_dict.get('experimentStatus', None)
-	    else:
-		status = "active"
-            log = resp_dict.get('allocationLog', None)
-            if not status:
-                sys.exit("No status in Info response??")
-            if log:
-                if len(log) > log_offset:
-                    print >>out, log[log_offset:],
-                    out.flush()
-                    log_offset = len(log)
-            if status == 'starting': 
-                time.sleep(update)
-
-        print >>out
-        print >>out, status
-        out.close()
-
 class start_segment(fedd_rpc):
     def __init__(self): 
@@ -1852,77 +513,67 @@
 	    print resp_dict
 
-class ns_topdl(fedd_rpc):
-    def __init__(self): 
-        fedd_rpc.__init__(self)
-    def __call__(self):
-        # Process the options using the customized option parser defined above
-        parser = fedd_ns_topdl_opts()
-
-        (opts, args) = parser.parse_args()
-
-        if opts.trusted:
-            if ( not os.access(opts.trusted, os.R_OK) ) :
-                sys.exit("Cannot read trusted certificates (%s)" % opts.trusted)
-
-        if opts.debug > 0: opts.tracefile=sys.stderr
-
-        (user, cert) = self.get_user_info()
-
-        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.file:
-	    try:
-		f = open(opts.file,"r")
-		contents = "".join(f)
-		f.close()
-	    except EnvironmentError, e:
-		sys.exit("Can't read %s: %s" % (opts.file, e))
-        else:
-            sys.exit("Must specify an experiment description (--file)")
-
-        msg = { 'description': { 'ns2description': contents }, }
-
-        if opts.debug > 1: print >>sys.stderr, msg
-
-        try:
-            resp_dict = self.do_rpc(msg, 
-                    opts.url, opts.transport, cert, opts.trusted, 
-                    serialize_only=opts.serialize_only,
-                    tracefile=opts.tracefile,
-		    caller=self.caller('Ns2Topdl'))
-        except self.RPCException, e:
-            exit_with_fault(\
-                    {'desc': e.desc, 'errstr': e.errstr, 'code': e.code})
-        except RuntimeError, e:
-            sys.exit("Error processing RPC: %s" % e)
-
-        if 'experimentdescription' in resp_dict:
-	    if 'topdldescription' in resp_dict['experimentdescription']:
-		exp = resp_dict['experimentdescription']['topdldescription']
-		top = topdl.Topology(**exp)
-	    else:
-                sys.exit("Bad response: could not translate")
-	elif opts.serialze_only:
-	    sys.exit(0)
-        else:
-            sys.exit("Bad response. %s" % e.message)
-
-	if opts.outfile:
-	    try:
-		f = open(opts.outfile, "w")
-		print >>f, topdl.topology_to_xml(top, top="experiment")
-		f.close()
-	    except EnvironmentError, e:
-		sys.exit("Can't write to %s: %s" % (opts.outfile, e))
-	else:
-	    print topdl.topology_to_xml(top, top="experiment")
+class ftopo:
+    def __call__(self):
+	sys.exit("Use fedd_ftopo.py")
+
+class exp_data:
+    def __call__(self):
+	sys.exit("Use fedd_info.py")
+
+class vtopo:
+    def __call__(self):
+	sys.exit("Use fedd_info.py --data=vtopo")
+
+class vis:
+    def __call__(self):
+	sys.exit("Use fedd_info.py --data=vis")
+
+class status:
+    def __call__(self):
+	sys.exit("Use fedd_info.py --data=status")
+
+class multi_exp_data:
+    def __call__(self):
+	sys.exit("Use fedd_multiinfo")
+
+class multi_status:
+    def __call__(self):
+	sys.exit("Use fedd_multistatus")
+
+class image:
+    def __call__(self):
+	sys.exit("Use fedd_image.py")
+
+class topdl_image:
+    def __call__(self):
+	sys.exit("Use fedd_image.py")
+
+class ns_image:
+    def __call__(self):
+	sys.exit("Use fedd_image.py")
+
+class terminate:
+    def __call__(self):
+	sys.exit("Use fedd_terminate.py")
+
+class new:
+    def __call__(self):
+	sys.exit("Use fedd_new.py")
+
+class create:
+    def __call__(self):
+	sys.exit("Use fedd_create.py")
+
+class split:
+    def __call__(self):
+	sys.exit("Discontinued function")
+
+class spew_log:
+    def __call__(self):
+	sys.exit("Use fedd_spewlog.py")
+
+class ns_topdl:
+    def __call__(self):
+	sys.exit("Use fedd_ns2topdl.py")
 
 cmds = {\
