- help="Retreive or not reservation-oriented RSpecs ([resources]|leases|all )",
- choices=("all", "resources", "leases"), default="resources")
-
-
- if command in ("resources", "describe", "allocate", "provision", "show", "list", "gid"):
- 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",
- choices=("text", "xml"))
-
- parser.add_option("-F", "--fileformat", dest="fileformat", type="choice",
- help="output file format ([xml]|xmllist|hrnlist)", default="xml",
- choices=("xml", "xmllist", "hrnlist"))
- if command == 'list':
- parser.add_option("-r", "--recursive", dest="recursive", action='store_true',
- help="list all child records", default=False)
- parser.add_option("-v", "--verbose", dest="verbose", action='store_true',
- help="gives details, like user keys", default=False)
- if command in ("delegate"):
- parser.add_option("-u", "--user",
- action="store_true", dest="delegate_user", default=False,
- help="delegate your own credentials; default if no other option is provided")
- parser.add_option("-s", "--slice", dest="delegate_slices",action='append',default=[],
- metavar="slice_hrn", help="delegate cred. for slice HRN")
- parser.add_option("-a", "--auths", dest='delegate_auths',action='append',default=[],
- metavar='auth_hrn', help="delegate cred for auth HRN")
- # this primarily is a shorthand for -a my_hrn
- parser.add_option("-p", "--pi", dest='delegate_pi', default=None, action='store_true',
- help="delegate your PI credentials, so s.t. like -a your_hrn^")
- parser.add_option("-A","--to-authority",dest='delegate_to_authority',action='store_true',default=False,
- help="""by default the mandatory argument is expected to be a user,
+ help="Retrieve or not reservation-oriented RSpecs ([resources]|leases|all)",
+ choices=("all", "resources", "leases"), default="resources")
+
+ if canonical in ("resources", "describe", "allocate", "provision", "show", "list", "gid"):
+ parser.add_option("-o", "--output", dest="file",
+ help="output XML to file", metavar="FILE", default=None)
+
+ if canonical in ("show", "list"):
+ parser.add_option("-f", "--format", dest="format", type="choice",
+ help="display format ([text]|xml)", default="text",
+ choices=("text", "xml"))
+
+ parser.add_option("-F", "--fileformat", dest="fileformat", type="choice",
+ help="output file format ([xml]|xmllist|hrnlist)", default="xml",
+ choices=("xml", "xmllist", "hrnlist"))
+ if canonical == 'list':
+ parser.add_option("-r", "--recursive", dest="recursive", action='store_true',
+ help="list all child records", default=False)
+ parser.add_option("-v", "--verbose", dest="verbose", action='store_true',
+ help="gives details, like user keys", default=False)
+ if canonical in ("delegate"):
+ parser.add_option("-u", "--user",
+ action="store_true", dest="delegate_user", default=False,
+ help="delegate your own credentials; default if no other option is provided")
+ parser.add_option("-s", "--slice", dest="delegate_slices", action='append', default=[],
+ metavar="slice_hrn", help="delegate cred. for slice HRN")
+ parser.add_option("-a", "--auths", dest='delegate_auths', action='append', default=[],
+ metavar='auth_hrn', help="delegate cred for auth HRN")
+ # this primarily is a shorthand for -A my_hrn^
+ parser.add_option("-p", "--pi", dest='delegate_pi', default=None, action='store_true',
+ help="delegate your PI credentials, so s.t. like -A your_hrn^")
+ parser.add_option("-A", "--to-authority", dest='delegate_to_authority', action='store_true', default=False,
+ help="""by default the mandatory argument is expected to be a user,