X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=cmdline%2Fsfi.py;h=c7998bf3825b40356cc5671e55c23147e3267e43;hb=114cad6edc248bfe2cc49cbed0cdc2dddd186d95;hp=e106eb5d988027c641e947078166d010e94e7ad4;hpb=abaf662d462c19c6b8d3e888e4c6d131542be8aa;p=sfa.git diff --git a/cmdline/sfi.py b/cmdline/sfi.py index e106eb5d..c7998bf3 100755 --- a/cmdline/sfi.py +++ b/cmdline/sfi.py @@ -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'])