class name should be create_slice not create_slices
[sfa.git] / cmdline / sfi.py
index e106eb5..c7998bf 100755 (executable)
@@ -304,14 +304,17 @@ def main():
    (cmd_opts, cmd_args) = create_cmd_parser(command).parse_args(args[1:])
    verbose = options.verbose
    if verbose :
-      print options.registry, options.sm, options.dir, options.verbose,\
-         options.user, options.auth
-      print command
+      print "Resgistry %s, sm %s, dir %s, user %s, auth %s" % (options.registry, 
+                                            options.sm, 
+                                            options.dir,
+                                            options.user, 
+                                            options.auth)
+      print "Command %s" %command
       if command in ("resources"):
-         print cmd_opts.format
+         print "resources cmd_opts %s" %cmd_opts.format
       elif command in ("list","show","remove"):
-         print cmd_opts.type
-      print cmd_args
+         print "cmd_opts.type %s" %cmd_opts.type
+      print "cmd_args %s" %cmd_args
 
    set_servers(options)
 
@@ -334,6 +337,8 @@ def list(opts, args):
    global registry
    user_cred = get_user_cred()
    list = registry.list(user_cred, args[0])
+   # filter on person, slice, site, node, etc.  
+   # THis really should be in the filter_records funct def comment...
    list = filter_records(opts.type, list)
    display_records(list)
    if opts.file:
@@ -515,12 +520,13 @@ def save_rspec_to_file(rspec, filename):
    return
 
 def display_records(recordList, dump = False):
+   ''' Print all fields in the record'''
    for record in recordList:
       display_record(record, dump)
 
 def display_record(record, dump = False):
    if dump:
-       record.dump(False)
+       record.dump()
    else:
        info = record.getdict()
        print "%s (%s)" % (info['hrn'], info['type'])