Use a simpler query construct in ConsoleFS.
[invirt/packages/invirt-console.git] / server / usr / bin / invirt-consolefs
index a3f75ec..359ad16 100755 (executable)
@@ -46,7 +46,7 @@ class ConsoleFS(routefs.RouteFS):
         if time() - self.lasttime > 5:
             self.lasttime = time()
             database.clear_cache()
-            self.machines = dict((machine.name, machine) for machine in database.session.query(database.Machine).all())
+            self.machines = dict((machine.name, machine) for machine in database.Machine.query.all())
 
     def getMachines(self, **kw):
         self.recache()
@@ -85,7 +85,7 @@ class ConsoleFS(routefs.RouteFS):
             (princ, realm) = user.split('@')
         else:
             princ = user
-            realm = config.authn[0].realm
+            realm = config.kerberos.realm
         
         return princ.replace('.', '/') + '@' + realm