+ def listRecords(self, hrn, rectype=None, filename=None):
+ args = ["-u", config.getUser(), "-a", config.getAuthority(),
+ "-r", config.getRegistry(), "-s", config.getSlicemgr(), "list", hrn]
+
+ if filename:
+ # we can't tell whether SFI will create one file or many, so delete
+ # leftovers from last time, then we'll know what we got, after we get it.
+ if os.path.exists(filename):
+ os.remove(filename)
+ if os.path.exists(filename + ".1"):
+ os.remove(filename + ".1")
+ args.append("-o")
+ args.append(filename)
+
+ if rectype:
+ args.append("-t")
+ args.append(rectype)
+
+ self.__init_command(args)
+ self.start()
+