Ignore:
Timestamp:
Oct 1, 2008, 7:29:06 PM (16 years ago)
Author:
broder
Message:

Fix RemConfFS - add code to list acl/ and update for new SQLAlchemy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-remote-server/files/usr/sbin/sipb-xen-remconffs

    r982 r986  
    2121       
    2222        The machine list and the acls are drawn from a database.
    23        
    24         This filesystem only implements the getattr, getdir, read, and readlink
    25         calls, because this is a read-only filesystem.
    2623        """
    2724       
     
    4138                m = Mapper()
    4239                m.connect('', controller='getroot')
     40                m.connect('acl', controller='getmachines')
    4341                m.connect('acl/:machine', controller='getacl')
    4442                m.connect('conf', controller='getconf')
     
    6361                                 " /etc/remctl/remconffs/acl/%s"
    6462                                 % (machine_name, machine_name)
    65                                  for machine_name in self.getMachines())+'\n'
     63                                 for machine_name in self.getmachines())+'\n'
    6664       
    67         def getMachines(self):
     65        def getmachines(self, **kw):
    6866                """Get the list of VMs in the database, clearing the cache if it's
    6967                older than 15 seconds"""
     
    7169                        self.lasttime = time()
    7270                        database.clear_cache()
    73                 return [machine.name for machine in database.Machine.select()]
     71                return [machine.name for machine in database.session.query(database.Machine).all()]
    7472       
    7573        def userToPrinc(self, user):
Note: See TracChangeset for help on using the changeset viewer.