specify -t --type option when calling sfi show
[sface.git] / sface / sfiprocess.py
index 6f131a7..089c739 100644 (file)
@@ -221,9 +221,15 @@ class SfiProcess(QObject):
         self.__init_command(args)
         self.start()
 
-    def getRecord(self, hrn, filename=None):
-        args = ["-u", config.getUser(), "-a", config.getAuthority(),
-                "-r", config.getRegistry(), "-s", config.getSlicemgr(), "show", hrn]
+    def getRecord(self, hrn, type=None, filename=None):
+        args = ["-u", config.getUser(), 
+                "-a", config.getAuthority(),
+                "-r", config.getRegistry(), 
+                "-s", config.getSlicemgr(), 
+                "show", hrn]
+        if type:
+            args.append("-t")
+            args.append(type) 
         if filename:
             args.append("-o")
             args.append(filename)
@@ -231,10 +237,10 @@ class SfiProcess(QObject):
         self.start()
 
     def getSliceRecord(self):
-        self.getRecord(config.getSlice(), config.getSliceRecordFile())
+        self.getRecord(config.getSlice(), type="slice", filename=config.getSliceRecordFile())
 
     def getAuthorityRecord(self):
-        self.getRecord(config.getAuthority(), config.getAuthorityRecordFile())
+        self.getRecord(config.getAuthority(), filename=config.getAuthorityRecordFile())
 
     def applyRSpec(self, rspec, aggAddr=None, aggPort=None, saveObtained=True):
         # that's what we pass, like in what we'd like to get