From 33149b755949cfea3130204d064fb7ce8624f037 Mon Sep 17 00:00:00 2001 From: Sapan Bhatia Date: Tue, 14 Jul 2009 15:18:11 +0000 Subject: [PATCH 1/1] Fixed, tested to work. --- sfa/client/sfi.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sfa/client/sfi.py b/sfa/client/sfi.py index f9aad359..7cff4976 100755 --- a/sfa/client/sfi.py +++ b/sfa/client/sfi.py @@ -314,14 +314,17 @@ def create_cmd_parser(command, additional_cmdargs = None): parser.add_option("-f", "--format", dest="format",type="choice", help="display format (dns|ip|xml)",default="xml", choices=("dns","ip","xml")) - parser.add_option("-o", "--output", dest="file", - help="output XML to file", metavar="FILE", default=None) - + 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 ("resources","show"): + parser.add_option("-o", "--output", dest="file", + help="output XML to file", metavar="FILE", default=None) + if command in ("show", "list"): parser.add_option("-f", "--format", dest="format", type="choice", help="display format (text|xml)",default="text", -- 2.43.0