repair previous change, different tabs now show the expected result
Thierry Parmentelat [Tue, 7 Sep 2010 15:03:25 +0000 (17:03 +0200)]
SfaData.py

index 6f8c9cc..38acb39 100644 (file)
@@ -14,14 +14,16 @@ class SfaData:
                  }
 
     def __init__(self):
-        filename = os.path.expanduser("~/.sfi/sfi_config")
-        execfile(filename, SfaData.__dict__)
+        self.filename = os.path.expanduser("~/.sfi/sfi_config")
+        execfile(self.filename, SfaData.__dict__)
         for (k,v) in SfaData.defaults.items():
             if not hasattr(SfaData,k): setattr(SfaData,k,v)
+    
+    def show(self,classname):
         if SfaData.SFAUI_VERBOSE:
-            print "After reading config from %s"%filename
-            for (k,v) in SfaData.defaults.items():
-                print "%-20s: %r"%(k,getattr(SfaData,k))
+            print "instance of %s after reading config from %s"%(classname,self.filename)
+            for (k,v) in SfaData.__dict__.items():
+                print "%-20s: %r"%(k,v)
 
     def getAuthority(self):
         return SfaData.SFI_AUTH
@@ -131,28 +133,34 @@ class PlanetLabData(SfaData):
 class PLEData(PlanetLabData):
     def __init__(self):
         PlanetLabData.__init__(self)
-        self.SFI_SM = "http://www.planet-lab.eu:12346"
+        SfaData.SFI_REGISTRY = "http://www.planet-lab.eu:12345"
+        SfaData.SFI_SM = "http://www.planet-lab.eu:12346"
+        self.show("PlanetLabData")
 
 class PLJData(PlanetLabData):
     def __init__(self):
         PlanetLabData.__init__(self)
-        self.SFI_SM = "http://www.planet-lab.jp:12346"
+        SfaData.SFI_SM = "http://www.planet-lab.jp:12346"
+        self.show("PLJData")
 
 class ViniData(PlanetLabData):
     def __init__(self):
         PlanetLabData.__init__(self)
-        self.SFI_SM = "http://www.vini-veritas.net:12346"
+        SfaData.SFI_SM = "http://www.vini-veritas.net:12346"
+        self.show("ViniData")
 
 class GpENIData(PlanetLabData):
     def __init__(self):
         PlanetLabData.__init__(self)
-        self.SFI_SM = "http://198.248.241.100:12346"
+        SfaData.SFI_SM = "http://198.248.241.100:12346"
+        self.show("GpENIData")
 
 class OpenCirrusData(SfaData):
     def __init__(self):
         SfaData.__init__(self)
         self.SFI_REGISTRY = "http://198.55.37.29:12345"
-        self.SFI_SM = "http://198.55.37.29:12346"
+        SfaData.SFI_SM = "http://198.55.37.29:12346"
+        self.show("OpenCirrusData")
 
     def refreshRSpec(self):
         xml = SfaData.getRSpec(self)