From 0421393b60d3a045b1848689862f59fa924c9dba Mon Sep 17 00:00:00 2001 From: Sapan Bhatia Date: Tue, 14 Jul 2009 14:53:00 +0000 Subject: [PATCH] dumpformat --> format --- sfa/client/sfi.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) 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() -- 2.45.2