From: Sapan Bhatia Date: Tue, 14 Jul 2009 14:53:00 +0000 (+0000) Subject: dumpformat --> format X-Git-Tag: sfa-0.9-0@14641~60 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=0421393b60d3a045b1848689862f59fa924c9dba;p=sfa.git dumpformat --> format --- diff --git a/sfa/client/sfi.py b/sfa/client/sfi.py index 9d1114e0..0510bc42 100755 --- a/sfa/client/sfi.py +++ b/sfa/client/sfi.py @@ -310,21 +310,20 @@ def create_cmd_parser(command, additional_cmdargs = None): parser = OptionParser(usage="sfi [sfi_options] %s [options] %s" \ % (command, cmdargs[command])) - # This option is for all commands - parser.add_option("-x", "--dumpformat", dest="dumpformat", type="choice", - help="dump format (text|xml)",default="text", - choices=("text","xml")) - if command in ("resources"): parser.add_option("-f", "--format", dest="format",type="choice", help="display format (dns|ip|rspec)",default="rspec", - choices=("dns","ip","rspec")) + choices=("dns","ip","xml")) if command in ("list", "show", "remove"): parser.add_option("-t", "--type", dest="type",type="choice", help="type filter (user|slice|sa|ma|node|aggregate)", choices=("user","slice","sa","ma","node","aggregate", "all"), default="all") if command in ("show", "list", "resources"): + # This option is for all commands + parser.add_option("-f", "--format", dest="format", type="choice", + help="display format (text|xml)",default="text", + choices=("text","xml")) parser.add_option("-o", "--output", dest="file", help="output XML to file", metavar="FILE", default=None) if command in ("delegate"): @@ -446,7 +445,7 @@ def show(opts, args): else: record = GeniRecord(dict = record) - if (opts.dumpformat=="text"): + if (opts.format=="text"): record.dump() else: print record.save_to_string()