- options = {'recursive': recursive}
- records = self.api.manager.List(self.api, xrn.get_hrn(), options=options)
- for record in records:
- if not type or record['type'] == type:
- print "%s (%s)" % (record['hrn'], record['type'])
-
-
- @args('-x', '--xrn', dest='xrn', metavar='<xrn>', help='object hrn/urn (mandatory)')
- @args('-t', '--type', dest='type', metavar='<type>', help='object type', default=None)
- @args('-o', '--outfile', dest='outfile', metavar='<outfile>', help='save record to file')
- @args('-f', '--format', dest='format', metavar='<display>', type='choice',
+ options_dict = {'recursive': recursive}
+ records = self.api.manager.List(self.api, xrn.get_hrn(), options=options_dict)
+ list = filter_records(type, records)
+ # terminal_render expects an options object
+ class Options: pass
+ options=Options()
+ options.verbose=verbose
+ terminal_render (list, options)
+
+
+ @add_options('-x', '--xrn', dest='xrn', metavar='<xrn>', help='object hrn/urn (mandatory)')
+ @add_options('-t', '--type', dest='type', metavar='<type>', help='object type', default=None)
+ @add_options('-o', '--outfile', dest='outfile', metavar='<outfile>', help='save record to file')
+ @add_options('-f', '--format', dest='format', metavar='<display>', type='choice',